Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem: apache + mod_proxy + dns-alias

Status
Not open for further replies.

frag

Programmer
Dec 7, 2000
321
GB
Hi!

I have a problem with mod_proxy.

We have a machine with the dns-entry "domain.example.com" and an alias called "alias.example.com". I setup the (reverse)proxy to forward all requests that go to a certain directory to another server (tomcat):

Code:
<IfModule mod_proxy.c>
    ProxyRequest Off
    ProxyPass /abc [URL unfurl="true"]http://domain.example.com:8080/abc[/URL]
    ProxyPassReverse /abc [URL unfurl="true"]http://domain.example.com:8080/abc[/URL]
</IfModule>

In this case the folder abc is in the tomcat's webapps-folder.

This works perfect if I try to access "abc" I can use " (with the trailing slash!) instead of "
BUT!

If I try to access " (without the slash!) I will be redirected to the desired website but the URL that is returned will be "http://alias.example.com/abc" and not "http://domain.example.com/abc".

Does someone know how to solve this or is it just impossible to do this?

Cheers

frag

real_firestorm@gmx.de
 
Ok, solved it on my own.

This

Code:
UseCanonicalName Off

will do the trick.

real_firestorm@gmx.de
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top