Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Can't do proxy redirect in Virtual Host

proxy, ajp, virtual host

10:09 am on May 3, 2014 (gmt 0)

New User

joined:May 3, 2014
posts: 1
votes: 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]

7:26 pm on May 6, 2014 (gmt 0)


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

joined:July 31, 2003
votes: 2

Welcome to WebmasterWorld, agriffin.

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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members