I want to use lighttpd as a development server, similar to WEBrick for Rails, or manage.py runserver
for Django. (This is for both PHP and for learning Javascript where I can't use AJAX on the local filesystem). I also want to be able to share the result with other developers through checking in the conf file to source control along with the code, so I want paths relative to the conf file, not absolute paths that are only valid on my system.
So I saw this answer about using lighttpd which is very close to what I want. However, rather than having to change to the correct directory and then run the script, ideally I want to be able to do:
lighttpd -f path/to/lighttpd.conf
and for the document root to be relative to the directory the lighttpd.conf file is in. So I want to be able to have a config line something like:
server.document-root = dirname(__file__) + "/html"
The answer linked to above uses CWD
for the directory, so this seems like something that might well be available. Any idea how to specify it?
(As a side note, can anyone link to a comprehensive reference to lighttpd.conf
and the options available? I haven't been able to find one.)