# Lighttpd errors while enabling HTTPS

**URL:** <https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482>\
**Category:** Help\
**Created:** [February 18, 2019, 2:45am UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482 "2019-02-18T02:45:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Argent99](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/argent99/32/6629_2.png) [@Argent99](https://discourse.pi-hole.net/u/Argent99)\
**Post date:** [February 18, 2019, 2:45am UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/1 "2019-02-18T02:45:22Z")

</div>

hi,

this is the last bit of configuring i'd like to do on my pihole (for now) and even though the process has confounded me pretty severely at times, i've finally managed to work myself past all the problems i had getting a certificate up and whatnot and at long last i was justrr one restart away from being done and this happens:

_pi@raspberrypi:~ $ sudo service lighttpd restart_  
_Job for lighttpd.service failed because the control process exited with error code._  
_See "systemctl status lighttpd.service" and "journalctl -xe" for details._

bringing up the indicated commands gives me:

_pi@raspberrypi:~ $ systemctl status lighttpd.service \_  
 \* lighttpd.service - Lighttpd Daemon  
\_ Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)_  
\_ Active: failed (Result: exit-code) since Sun 2019-02-17 18:25:32 PST; 13min ago\_  
\_ Process: 4582 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)\_  
\_ Process: 5018 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)\_  
\_ Main PID: 4582 (code=exited, status=0/SUCCESS)\_

_Feb 17 18:25:32 raspberrypi systemd[1]: lighttpd.service: Control process exited, code=exited status=255_  
_Feb 17 18:25:32 raspberrypi systemd[1]: Failed to start Lighttpd Daemon._  
_Feb 17 18:25:32 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state._  
_Feb 17 18:25:32 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'._  
_Feb 17 18:25:32 raspberrypi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart._  
_Feb 17 18:25:32 raspberrypi systemd[1]: Stopped Lighttpd Daemon._  
_Feb 17 18:25:32 raspberrypi systemd[1]: lighttpd.service: Start request repeated too quickly._  
_Feb 17 18:25:32 raspberrypi systemd[1]: Failed to start Lighttpd Daemon._  
_Feb 17 18:25:32 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state._  
_Feb 17 18:25:32 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'._

and:

_pi@raspberrypi:~ $ journalctl -xe_  
_-- Unit lighttpd.service has failed._  
\_-- \_  
_-- The result is failed._  
_Feb 17 18:41:33 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state._  
_Feb 17 18:41:33 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'._  
_Feb 17 18:41:33 raspberrypi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart._  
_Feb 17 18:41:33 raspberrypi systemd[1]: Stopped Lighttpd Daemon._  
_-- Subject: Unit lighttpd.service has finished shutting down_  
_-- Defined-By: systemd_  
\_-- Support: [https://www.debian.org/support\_](https://www.debian.org/support_)  
\_-- \_  
_-- Unit lighttpd.service has finished shutting down._  
_Feb 17 18:41:33 raspberrypi systemd[1]: lighttpd.service: Start request repeated too quickly._  
_Feb 17 18:41:33 raspberrypi systemd[1]: Failed to start Lighttpd Daemon._  
_-- Subject: Unit lighttpd.service has failed_  
_-- Defined-By: systemd_  
\_-- Support: [https://www.debian.org/support\_](https://www.debian.org/support_)  
\_-- \_  
_-- Unit lighttpd.service has failed._  
\_-- \_  
_-- The result is failed._  
_Feb 17 18:41:33 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state._  
_Feb 17 18:41:33 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'._

frankly, i'm utterly clueless as to what has gone wrong here. the only way to restore lighttpd functionality is to delete the external.conf file, which is what i plan to do for now. but i would still very much like to make this work. is there anything anyone can suggest that could fix this issue for me?

(and yes, my knowledge of \*nix is limited -- or just enough to be a danger to myself and my pi.)

thanks in advance!

**Mod Edit** : Moved from [Enabling HTTPS for your Pi-hole Web Interface](https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771)

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [February 18, 2019, 7:31pm UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/2 "2019-02-18T19:31:00Z")

</div>

If the issue is fixed by removing external.conf, then it may be that your version of lighttpd is too new for the config we ship. There have been some breaking changes in how lighttpd reads the config. Run `pihole -d` for a debug token.

---

<div class="post-metadata">

**Author:** ![Argent99](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/argent99/32/6629_2.png) [@Argent99](https://discourse.pi-hole.net/u/Argent99)\
**Post date:** [February 18, 2019, 8:18pm UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/3 "2019-02-18T20:18:34Z")

</div>

Your debug token is: **bue85wi6eu**

thanks again for helping! i would totally appreciate it if there is anything that jumps out at you besides the lighttpd issues -- still very noobish here and i'm sure i've messed up something along the way.

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [February 18, 2019, 9:40pm UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/4 "2019-02-18T21:40:29Z")

</div>

What is the output of these commands?

```auto
lighttpd -t -f /etc/lighttpd/lighttpd.conf
lighttpd -t -f /etc/lighttpd/external.conf
sudo service lighttpd restart
sudo service lighttpd status -l

```

---

<div class="post-metadata">

**Author:** ![Argent99](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/argent99/32/6629_2.png) [@Argent99](https://discourse.pi-hole.net/u/Argent99)\
**Post date:** [February 18, 2019, 11:47pm UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/5 "2019-02-18T23:47:14Z")

</div>

**root@raspberrypi:/home/pi# lighttpd -t -f /etc/lighttpd/lighttpd.conf**

> 2019-02-18 15:39:32: (configfile.c.1154) source: cat external.conf 2\>/dev/null line: 21 pos: 1 parser failed somehow near here: (EOL)  
> 2019-02-18 15:39:32: (configfile.c.1154) source: /etc/lighttpd/lighttpd.conf line: 77 pos: 1 parser failed somehow near here: (EOL)  
> root@raspberrypi:/home/pi# lighttpd -t -f /etc/lighttpd/external.conf  
> 2019-02-18 15:40:04: (configfile.c.1154) source: /etc/lighttpd/external.conf line: 21 pos: 1 parser failed somehow near here: (EOL)

**root@raspberrypi:/home/pi# lighttpd -t -f /etc/lighttpd/external.conf**

> 2019-02-18 15:40:04: (configfile.c.1154) source: /etc/lighttpd/external.conf line: 21 pos: 1 parser failed somehow near here: (EOL)

**root@raspberrypi:/home/pi# service lighttpd restart**

> Job for lighttpd.service failed because the control process exited with error code.  
> See "systemctl status lighttpd.service" and "journalctl -xe" for details.

**root@raspberrypi:/home/pi# service lighttpd status -l**

> lighttpd.service - Lighttpd Daemon  
> Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)  
> Active: failed (Result: exit-code) since Mon 2019-02-18 15:40:36 PST; 1min 6s ago  
> Process: 17001 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)  
> Main PID: 15870 (code=exited, status=0/SUCCESS)
> 
> Feb 18 15:40:36 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state.  
> Feb 18 15:40:36 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'.  
> Feb 18 15:40:36 raspberrypi systemd[1]: lighttpd.service: Service hold-off time over, scheduling restart.  
> Feb 18 15:40:36 raspberrypi systemd[1]: Stopped Lighttpd Daemon.  
> Feb 18 15:40:36 raspberrypi systemd[1]: lighttpd.service: Start request repeated too quickly.  
> Feb 18 15:40:36 raspberrypi systemd[1]: Failed to start Lighttpd Daemon.  
> Feb 18 15:40:36 raspberrypi systemd[1]: lighttpd.service: Unit entered failed state.  
> Feb 18 15:40:36 raspberrypi systemd[1]: lighttpd.service: Failed with result 'exit-code'.

---

<div class="post-metadata">

**Author:** ![Mcat12](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/mcat12/32/20_2.png) [@Mcat12](https://discourse.pi-hole.net/u/Mcat12)\
**Post date:** [February 18, 2019, 11:52pm UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/6 "2019-02-18T23:52:25Z")

</div>

What are the contents of `/etc/lighttpd/external.conf`?

---

<div class="post-metadata">

**Author:** ![Argent99](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/argent99/32/6629_2.png) [@Argent99](https://discourse.pi-hole.net/u/Argent99)\
**Post date:** [February 19, 2019, 2:12am UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/7 "2019-02-19T02:12:03Z")

</div>

```plaintext
$HTTP["host"] == "my.domain.com" {
  # Ensure the Pi-hole Block Page knows that this is not a blocked domain
  setenv.add-environment = ("fqdn" => "true")

  # Enable the SSL engine with a LE cert, only for this specific host
  $SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    ssl.pemfile = "/etc/letsencrypt/live/my.domain.com/combined.pem"
    ssl.ca-file = "/etc/letsencrypt/live/my.domain.com/fullchain.pem"
    ssl.honor-cipher-order = "enable"
    ssl.cipher-list = "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"
    ssl.use-sslv2 = "disable"
    ssl.use-sslv3 = "disable"       
  }
  # Redirect HTTP to HTTPS
  $HTTP["scheme"] == "http" {
    $HTTP["host"] =~ ".*" {
      url.redirect = (".*" => "https://%0$0")
    }
  }

```

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [February 19, 2019, 2:14am UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/8 "2019-02-19T02:14:01Z")

</div>

~~Add a final `}` to the end~~ , your brackets are unbalanced.

---

<div class="post-metadata">

**Author:** ![Argent99](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/argent99/32/6629_2.png) [@Argent99](https://discourse.pi-hole.net/u/Argent99)\
**Post date:** [February 19, 2019, 2:20am UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/9 "2019-02-19T02:20:44Z")

</div>

sigh. that did the trick. i'm so sorry i wasted everyones time with this. i'll make an extra donation as penance. 😄

---

<div class="post-metadata">

**Author:** ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)\
**Post date:** [March 12, 2019, 2:20am UTC](https://discourse.pi-hole.net/t/lighttpd-errors-while-enabling-https/17482/10 "2019-03-12T02:20:46Z")

</div>

Closed on March 12, 2019, 2:20am UTC

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
