You are here
SPlante - Thu, 2018/01/18 - 01:43
Hello, I have installed succesfully the virtual appliance Lighttpd PHP FastCGI v14.2 on Xenserver v6.2 using the ISO. It was very smooth. I am new to Lighttpd and I want to setup Wordpress on it. The first thing I did was to look into /etc/lighttpd/lighttpd.conf for the server root location.
Variable is set
server.document-root = "/var/www/html"
but there is no such directory and Lighttpd seem to serv index.php file from /etc/www.
Anybody can enlight me!
Regards
Forum:
Lighty uses a number of config files
We ship Lighty with the default (Debian) main config file (/etc/lighttpd/lighttpd.conf). However, after it's read that file, then it will proceed to read the config files located within /etc/lighttpd/conf-enabled/
If you have a look in there (i.e. `ls -la /etc/lighttpd/conf-enabled`) you should see that files there are actually symlinks to the real config files in /etc/lighttpd/conf-available/.
As you can see, those filenames are prefixed with a number. That's because they're processed in alphanumeric order (and as I say, later config, over rules earlier config).
The file you'll want to edit is /etc/lighttpd/conf-available/50-webroot.conf
FWIW, a really handy tool for searching through text files and directories of text files (e.g. config) is grep. Say to find all the incidences of /var/www in any Lighty config file, try this:
That will show the file you already found, but would also show the one we have pre-configured.To search the contents of a single file, omit the '-r' (recursive) switch. Essentially it takes the form:
For more info (including other switches and info) please launch with the '--help' switch, or see the man (short for manual) page. Access that like this: Almost all commands should have a man page.Hope that's useful. Good luck! :)
lighttpd.conf
Thank you Jeremy!
Very helpful. But this raise another question : Is it part of lightly to look for the conf-enable directory or is it part of an init script somewhere?
Regards
TBH, I'm not sure...
I'm also about to fly interstate and will be away from my desk for about 10 days. So I'm not sure when I'll get a chance to check.
Perhaps you can use grep to search through lighty config dir to see if there are mentions of "sites-enabled" (grep only looks for the text within file, not for path names, so if it's configured somewhere in there, you should see).
If it's not in there, then it may well be the init script. 2 likely locations are /etc/init.d (file name will probably be lighttpd or similar) as well as /etc/default.
Let me know how you go. If you don't have any luck, when I get a chance, I can launch a cloud server and check for you.
lighttpd.conf
Thanks again Jeremy. No cause for trouble. I was just asking, in case you knew from the top of your mind or is it your head? Anyway thank for your help. If I ever find out, I will post it out.
Regards
Add new comment