httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Map URL to directory
Date Mon, 24 Oct 2011 11:50:04 GMT
On Fri, Oct 21, 2011 at 6:53 PM, milan tomic <tomicmilan@yahoo.com> wrote:
>
>
> Pete Houston wrote:
>>
>> Most likely what you are after is the "Alias" directive.
>>
>
> Yes, Alias is what I need. But it doesn't work for me. I have this case:
>
> <VirtualHost *:80>
>  DocumentRoot "D:/Dir1/Dir2"
>
> <Location /MainPath/App1>
>  ProxyPass  http://tomcat1/MainPath/App1
> </Location>
>
> Alias /MainPath/AL "D:\Dir3\Dir4"
> <Directory "D:\Dir3\Dir4">
>  Order allow,deny
>  Allow from all
> </Directory>
>
> <Location /MainPath/>
>  ProxyPass  ajp://tomcat2/MainPath/
> </Location>
>
> ProxyPass /MainPath ajp://tomcat2/MainPath
>
> </VirtualHost>
>
> and when I visit http://apachehttpd1/MainPath/AL tomcat returns 404 not
> found :(

Tell Apache not to proxy that specific URL (no location block with this style):

ProxyPass /MainPath/AL !
ProxyPass /MainPath/App1 http://tomcat1/MainPath/App1
ProxyPass /MainPath/ ajp://tomcat2/MainPath/

Alias /MainPath/AL "D:\Dir3\Dir4"
<Directory "D:\Dir3\Dir4">
  Order allow,deny
  Allow from all
</Directory>

Cheers

Tom

---------------------------------------------------------------------
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


Mime
View raw message