Disable HTTP admin connections

Hello,
just wondering, in LUCI, administration page, i can enable HTTPS and redirect HTTP connection to https. Shouldn't it be possible to just disable HTTP? i know i can do it manually via uci/config file, but wouldn't it be more correct? (as a side note, just redirecting http to https isn't allowing to automatically renew letsencrypt certs via webroot mode..)

What end result you are trying to achieve? uhttpd is not among good public webservers.

just homelab. I have a local CA, i'd like to get all lan devices with a proper certificate, but (repeating myself: it's just a POC in my homelab :)) i'd like to have a clean way to disable at all http access.
I'm not going to expose uhttpd :slight_smile: my public services go through a cloudflare tunnel to a nginx server in a VM in a dedicated vlan and bla bla bla..

Try hacking these

$ cat /etc/config/uhttpd

config uhttpd 'main'
        list listen_http '0.0.0.0:80'
        list listen_http '[::]:80'
        list listen_https '0.0.0.0:443'
        list listen_https '[::]:443'

and then restart and see if it changes the ports

$ netstat -nlp | grep uhttp
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3659/uhttpd
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      3659/uhttpd
tcp        0      0 :::80                   :::*                    LISTEN      3659/uhttpd
tcp        0      0 :::443                  :::*                    LISTEN      3659/uhttpd
1 Like