lighttpd symfony configuration w/ file existence lookup
server.modules += ("mod_rewrite", "mod_magnet") |
$HTTP["host"] =~ "(^|\.)your-domain\.com$" { | |
server.document-root = "/var/www/your-domain.com/web" | |
server.errorlog = "/var/log/lighttpd/your-domain.com/error.log" | |
accesslog.filename = "/var/log/lighttpd/your-domain.com/access.log" | |
include "symfony.conf" | |
} |
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 |
url.rewrite-once = ( | |
"^/(.*)\.(.*)" => "$0", | |
"^/([^.]+)$" => "/index.php/$1", | |
"^/$" => "/index.php" | |
) | |
magnet.attract-physical-path-to = ( "/etc/lighttpd/rewrite.lua" ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
As of lighttpd 1.4.x the existence file lookup is simpler with
url.rewrite-if-not-file