Lighttpd web application development disturbance through aliasing on 127.0.0.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lighttpd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lighttpd
This bug affects Ubuntu 9.04, package Lighttpd in version 1.4.19-5ubuntu7
In the default lighttpd.conf there is a global section to alias /images/ to /usr/share/images/. This breaks all local /images/ folders in web development projects.
$HTTP[
alias.url += (
"/doc/" => "/usr/share/doc/",
)
}
}
I'd suggest to add another condition around this aliases, which check for the host name in addition. This way, users who use different host names that localhost for their projects to not run into this issue.
$HTTP["host"] = "localhost" {
)
}
}
}
Same problem here, however the suggested problem wouldn't work for me (or other projects that use path aliases - which is most projects that currently configure apache).
The following does work, but you'd probably need a combination of this and the above solution to cover all situations:
$HTTP["remoteip"] =~ "127.0.0.1" {
"^doc/ " => "/usr/share/doc/",
"^images/ " => "/usr/share/ images/ "
$HTTP[ "url"] =~ "^/doc/|^/images/" {
dir-listing. activate = "enable"
alias.url += (
)
}
}