You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Andre Hübner <an...@gmx.de> on 2008/07/30 16:36:59 UTC

[users@httpd] alias with subfolders

apache 2.2.9

Hi,

try to use 

Alias /folder1/folder2 /local/path/local/path

in my httpd.conf. All i get is an 404 error.

If i change to:

Alias /folder1 /local/path/local/path

/folder1 is correct maped to /local/path/local/path and requests are ok
I did not found any hint that aliasing with subfolders is not allowed.
What could be the problem? 

Thanks
Andre

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] alias with subfolders

Posted by Andre Hübner <an...@gmx.de>.
Hi,
> <quote>
> For this reason, when two or more of these directives apply to the same 
> sub-path, you must list the most specific path first in order for all 
> the directives to have an effect. For example, the following 
> configuration will work as expected:
> 
> Alias /foo/bar /baz
> Alias /foo /gaq
> 
> </quote>
> 

arrg, thats it. i have an 
alias /folder1  /special/folder

in my virtualhosts. i can fix this...
Thanks

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] alias with subfolders

Posted by Davide Bianchi <da...@onlyforfun.net>.
Andre Hübner wrote:
> try to use
> Alias /folder1/folder2 /local/path/local/path
> 
> in my httpd.conf. All i get is an 404 error.
> 
> If i change to:
> 
> Alias /folder1 /local/path/local/path
> 
> /folder1 is correct maped to /local/path/local/path and requests are ok
> I did not found any hint that aliasing with subfolders is not allowed.

Indeed in the documentation states that *is* allowed:

<quote>
For this reason, when two or more of these directives apply to the same 
sub-path, you must list the most specific path first in order for all 
the directives to have an effect. For example, the following 
configuration will work as expected:

Alias /foo/bar /baz
Alias /foo /gaq

</quote>

Now, unless you have another "Alias /folder1" in your config, maybe the 
problem is another one. What error is logged in the error_log when you 
get the 404?

Davide

-- 
It's no wonder they call it WinNT; WNT = VMS++;
    -- Chris Abbey

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org