Actions
Bug #111
closedmod_alias breaks if 2 alias have similar names
ASK QUESTIONS IN Forums:
Description
i have the following snippet in my lighttpd.conf
alias.url = ( "/doc" => "/usr/share/doc", "/documentation" => "/home/myuser/Documents/docs" ) $HTTP["url"] =~ "^/doc" { dir-listing.activate = "enable" } $HTTP["url"] =~ "^/documentation" { dir-listing.activate = "enable" }
log for http://localhost/documentation/
==> /var/log/lighttpd/access.log <== ::ffff:127.0.0.1 - - [02/May/2005:02:40:51 +0200] "GET /documentation/ HTTP/1.1" 404 - "-" "Opera/8.0 (X11; Linux i686; U; en)" ==> /var/log/lighttpd/error.log <== 2005-05-02 02:40:51: (response.c.172) -- splitting Request-URI 2005-05-02 02:40:51: (response.c.173) Request-URI : /documentation/ 2005-05-02 02:40:51: (response.c.174) URI-scheme : http 2005-05-02 02:40:51: (response.c.175) URI-authority: localhost 2005-05-02 02:40:51: (response.c.176) URI-path : /documentation/ 2005-05-02 02:40:51: (response.c.177) URI-query : 2005-05-02 02:40:51: (response.c.221) -- sanatising URI 2005-05-02 02:40:51: (response.c.222) URI-path : /documentation/ 2005-05-02 02:40:51: (response.c.282) -- before doc_root 2005-05-02 02:40:51: (response.c.283) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:40:51: (response.c.284) Rel-Path : /documentation/ 2005-05-02 02:40:51: (response.c.285) Path : 2005-05-02 02:40:51: (response.c.327) -- after doc_root 2005-05-02 02:40:51: (response.c.328) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:40:51: (response.c.329) Rel-Path : /documentation/ 2005-05-02 02:40:51: (response.c.330) Path : /srv/www/htdocs/documentation/ 2005-05-02 02:40:51: (response.c.347) -- logical -> physical 2005-05-02 02:40:51: (response.c.348) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:40:51: (response.c.349) Rel-Path : /documentation/ 2005-05-02 02:40:51: (response.c.350) Path : /usr/share/documentation/ 2005-05-02 02:40:51: (response.c.367) -- handling physical path 2005-05-02 02:40:51: (response.c.368) Path : /usr/share/documentation/
log for http://localhost/doc
==> /var/log/lighttpd/access.log <== ::ffff:127.0.0.1 - - [02/May/2005:02:43:27 +0200] "GET /doc HTTP/1.1" 301 - "-" "Opera/8.0 (X11; Linux i686; U; en)" ==> /var/log/lighttpd/error.log <== 2005-05-02 02:43:27: (response.c.172) -- splitting Request-URI 2005-05-02 02:43:27: (response.c.173) Request-URI : /doc 2005-05-02 02:43:27: (response.c.174) URI-scheme : http 2005-05-02 02:43:27: (response.c.175) URI-authority: localhost 2005-05-02 02:43:27: (response.c.176) URI-path : /doc 2005-05-02 02:43:27: (response.c.177) URI-query : 2005-05-02 02:43:27: (response.c.221) -- sanatising URI 2005-05-02 02:43:27: (response.c.222) URI-path : /doc 2005-05-02 02:43:27: (response.c.282) -- before doc_root 2005-05-02 02:43:27: (response.c.283) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:43:27: (response.c.284) Rel-Path : /doc 2005-05-02 02:43:27: (response.c.285) Path : 2005-05-02 02:43:27: (response.c.327) -- after doc_root 2005-05-02 02:43:27: (response.c.328) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:43:27: (response.c.329) Rel-Path : /doc 2005-05-02 02:43:27: (response.c.330) Path : /srv/www/htdocs/doc 2005-05-02 02:43:27: (response.c.347) -- logical -> physical 2005-05-02 02:43:27: (response.c.348) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:43:27: (response.c.349) Rel-Path : /doc 2005-05-02 02:43:27: (response.c.350) Path : /usr/share/doc 2005-05-02 02:43:27: (response.c.367) -- handling physical path 2005-05-02 02:43:27: (response.c.368) Path : /usr/share/doc 2005-05-02 02:43:27: (response.c.380) -- file found 2005-05-02 02:43:27: (response.c.381) Path : /usr/share/doc 2005-05-02 02:43:27: (response.c.172) -- splitting Request-URI 2005-05-02 02:43:27: (response.c.173) Request-URI : /doc/ 2005-05-02 02:43:27: (response.c.174) URI-scheme : http 2005-05-02 02:43:27: (response.c.175) URI-authority: localhost 2005-05-02 02:43:27: (response.c.176) URI-path : /doc/ 2005-05-02 02:43:27: (response.c.177) URI-query : 2005-05-02 02:43:27: (response.c.221) -- sanatising URI 2005-05-02 02:43:27: (response.c.222) URI-path : /doc/ 2005-05-02 02:43:27: (response.c.282) -- before doc_root 2005-05-02 02:43:27: (response.c.283) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:43:27: (response.c.284) Rel-Path : /doc/ 2005-05-02 02:43:27: (response.c.285) Path : 2005-05-02 02:43:27: (response.c.327) -- after doc_root 2005-05-02 02:43:27: (response.c.328) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:43:27: (response.c.329) Rel-Path : /doc/ 2005-05-02 02:43:27: (response.c.330) Path : /srv/www/htdocs/doc/ 2005-05-02 02:43:27: (response.c.347) -- logical -> physical 2005-05-02 02:43:27: (response.c.348) Doc-Root : /srv/www/htdocs/ 2005-05-02 02:43:27: (response.c.349) Rel-Path : /doc/ 2005-05-02 02:43:27: (response.c.350) Path : /usr/share/doc/ 2005-05-02 02:43:27: (response.c.367) -- handling physical path 2005-05-02 02:43:27: (response.c.368) Path : /usr/share/doc/ 2005-05-02 02:43:27: (response.c.380) -- file found 2005-05-02 02:43:27: (response.c.381) Path : /usr/share/doc/ 2005-05-02 02:43:27: (response.c.528) -- handling subrequest 2005-05-02 02:43:27: (response.c.529) Path : /usr/share/doc/ 2005-05-02 02:43:27: (mod_indexfile.c.145) -- handling the request as Indexfile 2005-05-02 02:43:27: (mod_indexfile.c.146) URI : /doc/ 2005-05-02 02:43:27: (mod_dirlisting.c.562) -- handling the request as Dir-Listing 2005-05-02 02:43:27: (mod_dirlisting.c.563) URI : /doc/ 2005-05-02 02:43:27: (response.c.540) -- subrequest finished
working apache config
# conf/mod_alias.test.conf Alias /doc /home/myuser/Documents/docs Alias /documentation /usr/share/doc <Directory /home/myuser/Documents/docs> Order allow,deny Allow from all Options Indexes </Directory> <Directory /usr/share/doc> Order allow,deny Allow from all Options Indexes </Directory>
it doesnt matter if i call http://localhost/documentation with or without trailing "/" it still fails.
Updated by Anonymous over 19 years ago
reverse your order please.
lastest apache2.x it give u a warning, u cannot do so forever :)
alias.url = ( "/documentation" => "/home/myuser/Documents/docs",
"/doc" => "/usr/share/doc" )
-- Xuefer <xuefer
Updated by Anonymous over 19 years ago
- Status changed from New to Fixed
- Resolution set to invalid
-- Xuefer <xuefer
Actions
Also available in: Atom