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
sudo vi /etc/hoststhen127.0.0.1 dev.{project-name}.com– Colin Jan 29 at 22:52