homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Can't do proxy redirect in Virtual Host
proxy, ajp, virtual host

Msg#: 4668170 posted 10:09 am on May 3, 2014 (gmt 0)


I have a server server.EXAMPLE.com which proxy redirects /app to port 8009 in httpd.conf as


ProxyPass /app ajp://localhost:8009/app

which redirects anything written as /app to port 8009 i.e.

http://server.example.com/app is redirected to ajp://server.EXAMPLE.com:8009/app

But then I wanted to add a virtual host test.EXAMPLE.com that also redirects /app to ajp port 8006 so I added this in my httpd.conf

ServerName test.EXAMPLE.com

DocumentRoot /var/www/html
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

ProxyPass /app ajp://localhost:8006/app


This doesn't redirect to 8006 because the setting above the virtual host is taking effect. That is
http://test.example.com/app is still redirecting to 8009 because the above setting is there. How can I make the setting inside the virtual host work to redirect to 8006 instead of 8009 while still having the above configuration?

[edited by: phranque at 12:25 pm (utc) on May 3, 2014]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]



WebmasterWorld Administrator coopster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4668170 posted 7:26 pm on May 6, 2014 (gmt 0)

Welcome to WebmasterWorld, agriffin.

How about wrapping the other proxy in it's own VirtualHost container as well?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved