I've been trying to set up a lighttpd to host a website, but when I run commands like systemctl start lighttpd
or systemctl status lighttpd.service
I continuously get errors.
After running systemctl start lighttpd
, I get the following:
Job for lighttpd.service failed because the control process exited with error code.
after I run systemctl status lighttpd.service
I get the following:
lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/lighttpd.service.d
└─dietpi.conf
Active: failed (Result: exit-code) since Sun 2023-04-23 22:27:55 BST; 9s ago
Process: 209906 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=255/EXCEPTION)
CPU: 10ms
Apr 23 22:27:55 iphone systemd[1]: lighttpd.service: Scheduled restart job, restart counter is at 5.
Apr 23 22:27:55 iphone systemd[1]: Stopped Lighttpd Daemon.
Apr 23 22:27:55 iphone systemd[1]: lighttpd.service: Start request repeated too quickly.
Apr 23 22:27:55 iphone systemd[1]: lighttpd.service: Failed with result 'exit-code'.
Apr 23 22:27:55 iphone systemd[1]: Failed to start Lighttpd Daemon.
I also ran this, lighttpd -t -f /etc/lighttpd/lighttpd.conf
and I get this:
2023-04-23 21:47:27: configfile.c.1909) source: /etc/lighttpd/lighttpd.conf line: 2 pos: 1 invalid character in variable name
2023-04-23 21:47:27: configfile.c.1967) configfile parser failed at: (
Ive tried reinstalling it, purging any remaining files of apache, not even Pihole works anymore as the webpage is messed up, it doesn't even load up anymore. I've tried updating everything and installing Gamin like a lot of people say, but I don't see any solutions to this problem anywhere.
2023-04-23 21:47:27: configfile.c.1909) source: /etc/lighttpd/lighttpd.conf line: 2 pos: 1 invalid character in variable name
lighttpd has told you exactly where the problem is in your config file, the first character of line 2 of /etc/lighttpd/lighttpd.conf. lighttpd even told you the misplaced character: (
. Go fix it.