Bug #1352
closedalias.url without conditions does not work
Description
lighttpd-1.4.16 (ssl), binary package from debian.
This does not work:
alias.url += ( "/wiki/" => "/some/ohter/root" )
But this does:
$HTTP["url"] ~= "^/" { alias.url += ( "/wiki/" => "/some/other/root" ) }
In case this is a feature it should be documented somewhere.
-- kosciuszkiewicz
Files
Updated by darix over 17 years ago
aliases work without conditionals too. please add debug.log-request-handling = "enable" and post the output to the error log for the non working case.
Updated by Anonymous over 17 years ago
access.log:
127.0.0.1 localhost - [10/Sep/2007:17:59:08 +0100] "GET /wiki/robots.txt HTTP/1.1" 404 345 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20070310 Iceweasel/2.0.0.3 (Debian-2.0.0.3-1)"
error.log:
2007-09-10 17:59:08: (response.c.205) -- splitting Request-URI 2007-09-10 17:59:08: (response.c.206) Request-URI : /wiki/robots.txt 2007-09-10 17:59:08: (response.c.207) URI-scheme : http 2007-09-10 17:59:08: (response.c.208) URI-authority: localhost 2007-09-10 17:59:08: (response.c.209) URI-path : /wiki/robots.txt 2007-09-10 17:59:08: (response.c.210) URI-query : 2007-09-10 17:59:08: (response.c.260) -- sanatising URI 2007-09-10 17:59:08: (response.c.261) URI-path : /wiki/robots.txt 2007-09-10 17:59:08: (mod_access.c.135) -- mod_access_uri_handler called 2007-09-10 17:59:08: (response.c.375) -- before doc_root 2007-09-10 17:59:08: (response.c.376) Doc-Root : /var/www/ 2007-09-10 17:59:08: (response.c.377) Rel-Path : /wiki/robots.txt 2007-09-10 17:59:08: (response.c.378) Path : 2007-09-10 17:59:08: (response.c.426) -- after doc_root 2007-09-10 17:59:08: (response.c.427) Doc-Root : /var/www/ 2007-09-10 17:59:08: (response.c.428) Rel-Path : /wiki/robots.txt 2007-09-10 17:59:08: (response.c.429) Path : /var/www/wiki/robots.txt 2007-09-10 17:59:08: (response.c.446) -- logical -> physical 2007-09-10 17:59:08: (response.c.447) Doc-Root : /var/www/ 2007-09-10 17:59:08: (response.c.448) Rel-Path : /wiki/robots.txt 2007-09-10 17:59:08: (response.c.449) Path : /var/www/wiki/robots.txt 2007-09-10 17:59:08: (response.c.466) -- handling physical path 2007-09-10 17:59:08: (response.c.467) Path : /var/www/wiki/robots.txt 2007-09-10 17:59:08: (response.c.523) -- file not found 2007-09-10 17:59:08: (response.c.524) Path : /var/www/wiki/robots.txt
-- kosciuszkiewicz
Updated by darix over 17 years ago
1. can you join #lighttpd on irc.freenode.net?
2. we would need your full config to see whats wrong.
Updated by darix over 17 years ago
- Status changed from New to Fixed
- Resolution set to invalid
Updated by hramrach over 8 years ago
I observe the same. Wrapping URL in some condition makes it magically work. Maybe it is related to having plain and conditional redirection. I am running lighttpd on Debian Testing and used a copy of their debian docs alias sample to write my own. Without the localhost condition it would not redirect. Also the sample config does not enable the alias modules o it dies not work at all until it is mannually enabled :s
Updated by gstrauss over 8 years ago
- Description updated (diff)
hramrach: Please re-read this ticket. Your post is missing a whole lot of information that was already requested of the previous poster.
Updated by gstrauss over 8 years ago
hramrach: this issue was filed for lighttpd 1.5.0. What version of lighttpd are you using? Is it 1.4.39 from Debian Testing? More information is needed, including your config.
There have been some improvements made to config processing since 1.4.39, and these changes will be in the next release of lighttpd (1.4.40, not yet released). If you are able to do so, you might build and test that to see if your issue has been resolved.
If not, we can do nothing more here until you help provide instructions how to reproduce this issue. (Don't assume that everyone uses Debian Testing)
Updated by gstrauss over 8 years ago
The issue reported here is possibly a limitation in lighttpd config merging that differs from end-user expectations.
Please see the following explanations:
https://redmine.lighttpd.net/issues/2597
https://redmine.lighttpd.net/boards/2/topics/6541?r=6543#message-6543
Updated by hramrach over 8 years ago
gstrauss wrote:
The issue reported here is possibly a limitation in lighttpd config merging that differs from end-user expectations.
Please see the following explanations:
https://redmine.lighttpd.net/issues/2597
https://redmine.lighttpd.net/boards/2/topics/6541?r=6543#message-6543
Indeed, this is the issue I am seeing.
Thanks for the explanation.
Also available in: Atom