[pkg-lighttpd] Bug#445459: lighttpd: mod_alias fails on localhost

Steve Greenland steveg at moregruel.net
Fri Oct 26 21:04:29 UTC 2007

On 24-Oct-07, 12:30 (CDT), Olaf van der Spek <olafvdspek at gmail.com> wrote: 
> On 10/24/07, Steve Greenland <steveg at moregruel.net> wrote:
> > Okay, while trying to make the minimal lighttpd.conf that exhibits the
> Could you post that minimal conf?

Here it is; I'd deleted it when I found the connection to 10-cgi.conf.

server.modules              = ( 
server.document-root       = "/var/www/"
index-file.names           = ( "index.php", "index.html",
                               "index.htm", "default.htm",
                               "index.lighttpd.html" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
server.pid-file            = "/var/run/lighttpd.pid"
dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"
server.username            = "www-data"
server.groupname           = "www-data"
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
alias.url += ("/foo" => "/var/www/footarget")

Note that you also need 10-cgi.conf linked into ./conf-enabled. Also,
put some 'index.html' into /var/www/footarget.

So, given the above, 'http://localhost/foo/' fails with a 404, while
'http://speedy.moregruel.net/foo/' succeeds, even though both access
exactly the same server, which is on the same machine as the browser.

And, again, commenting out the 'HTTP["remoteip"] == ""' clause in
10-cgi.enabled makes everything work.

Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net

More information about the pkg-lighttpd-maintainers mailing list