Hi I have lighttpd running on my local machine (somebody else set it up) and it is working on well on a specific project. I am trying to set it up for a new project myself from what I can work out/docs I have read. I have done the following but am getting server not found error when accessing dev.{project-name}.com. What have I done wrong/haven't done:

cd /etc/lighttpd/conf-available

sudo touch 01-{project-name}.conf

sudo vi 01-{project-name}.conf

$HTTP["host"] == "dev.{project-name}.com" {
    server.document-root = "/path/to/project/{project-name}/public_html"
    magnet.attract-physical-path-to = ( server.document-root + "/rewrite.lua" )
}

cd ../conf-enabled

sudo ln -s ../conf-available/01-{project-name}.conf 01-{project-name}.conf

sudo /etc/init.d/lighttpd restart

cd {parent-directory}/{project-name}/public_html

touch rewrite.lua

vi rewrite.lua

attr = lighty.stat(lighty.env["physical.path"])
if (not attr) then
    lighty.env["uri.path"] = "/index.php"
    lighty.env["physical.rel-path"] = lighty.env["uri.path"]
    lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"]
end
link|improve this question
Does the DNS name resolve to the correct IP? – Shane Madden Jan 29 at 21:47
Sorry I'm not really sure what that means/how to find out? – Colin Jan 29 at 21:57
sudo vi /etc/hosts then 127.0.0.1 dev.{project-name}.com – Colin Jan 29 at 22:52
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.