When adding the text from the " Enable HTTPS for you Pi-hole web interface FAQ" to the external.conf, lighttpd fails to load with the following error. Active: failed (Result: exit-code)
Debug Token:
Your debug token is: cuzpyaoxfd
Issue:
Following the directions at Enabling HTTPS for your Pi-hole Web Interface. Everything works fine until I edit the external.conf file. Once I add all the SSL information, lighttpd fails to load. I've replaced all the pihole.example.com with my information.
pi@raspberrypi:~ $ lighttpd -v
lighttpd/1.4.45 (ssl) - a light and fast webserver
Build-Date: Jan 14 2017 21:07:19
pi@raspberrypi:~ $ lighttpd -t -f /etc/lighttpd/lighttpd.conf
Syntax OK
pi@raspberrypi:~ $ sudo lighttpd -f /etc/lighttpd/lighttpd.conf
2018-12-24 08:12:43: (network.c.464) can't bind to port: 443 Address already in use
sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:4711 0.0.0.0:* LISTEN 342/pihole-FTL
tcp 0 0 127.0.0.1:43821 0.0.0.0:* LISTEN 427/cloudflared
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 342/pihole-FTL
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 592/sshd
tcp 0 0 127.0.0.1:5053 0.0.0.0:* LISTEN 427/cloudflared
tcp6 0 0 ::1:4711 :::* LISTEN 342/pihole-FTL
tcp6 0 0 :::53 :::* LISTEN 342/pihole-FTL
tcp6 0 0 :::22 :::* LISTEN 592/sshd
udp 0 0 127.0.0.1:5053 0.0.0.0:* 427/cloudflared
udp 0 0 0.0.0.0:53 0.0.0.0:* 342/pihole-FTL
udp 0 0 0.0.0.0:68 0.0.0.0:* 574/dhcpcd
udp 0 0 0.0.0.0:57024 0.0.0.0:* 358/avahi-daemon: r
udp 0 0 0.0.0.0:5353 0.0.0.0:* 358/avahi-daemon: r
udp6 0 0 :::45518 :::* 358/avahi-daemon: r
udp6 0 0 :::53 :::* 342/pihole-FTL
udp6 0 0 :::5353 :::* 358/avahi-daemon: r
Looks as though something is taking up port 443, put i don't see what it is.
I don't know how i would have 2 instances of it running. The only thing I did to product the error is the add the above text into the external.conf, then reboot lighttpd using
sudo service lighttpd restart
If i clear the contents of the external.conf, then restart again, everything works normally.
That looks like it's actually port 443 on 1.1.1.1 that is open, which is expected. I don't see anything on your device that has taken over port 443 so you still should be able to bind to it.
Can you try sudo lighttpd -tt -f /etc/lighttpd/lighttpd.conf and see if it will load the modules?
Really frustrating. I just recently bought my Raspberry Pi for the sole purpose of running Pi-Hole. I've read the instructions at Redirecting... to setup the dns over https through Cloudflared. Then i wanted to be able to access the Pi-hole remotely and setup HTTPS. Those are really the only 2 things i have running on my Raspberry.
Okay, 10-ssl.conf is linked as an active module. That's being loaded (and if you run sudo cat /etc/lighttpd/conf-available/10-ssl.conf you'll see a duplicate directive for port 443). If you remove external.conf and restart lighttpd I'm guessing that it will then show that lighttpd is active on port 443.
Potential solution would be to run sudo lighty-disable-mod ssl to disable the 10-ssl.conf configuration. Then you should be able to use external.conf as you have configured and it should work.
hmm. I don't remember editing this file, but looking at it, it has my custom server settings in it. Do you know what the default file should be for the 10-ssl.conf? Or how i can get it back to default?