httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] ProxyPassReverse
Date Fri, 29 Nov 2002 10:56:58 GMT
This is the first time I've seen that you are using a "Port" directive
inside a VH container. Remember what we discussed about "context"?...
You're not supposed to do that... However, it doesn't really matter so
long as you realise that port 8080 is now listened to for *all* VHs
(i.e. you can't restrict ports to VHs this way).

Anyhoo - I am assuming that:

- You want apache running on port 8080
- You have tomcat on port 8000
- You want all traffic transparently routed to tomcat.

If so, you have it almost exactly right. The behavior you're seeing is
exactly what I'd expect.

What is happening is:
- the request to gets into apache
correctly and the ProxyPass directive causes apache to request (i.e. tomcat).
- This is a request without a trailing slash, so tomcat responds with a
redirect to
- Apache gets the redirect and, because of the PRoxyPassReverse
directive, converts it to a redirect to which it sends to the
- The browser then reqests this and you should get the page (do you?)

So everything is behaving normally.

To get the index page immediately (without the redirect) try putting a
trailing slash on the PP and PPR directives, i.e.

	ProxyPass /
	ProxyPassReverse /

(This is actually how it is in the docs... tsk, tsk.)

Once you get past the homepage, make sure that all the links in the
tomcat site are relative and not absolute, i.e. they should be like:
href="/mydir/mypage.jsp" and not


Owen Boyle

>-----Original Message-----
>From: Martyn Longhurst (MJ) []
>Sent: Freitag, 29. November 2002 06:35
>Subject: [users@httpd] ProxyPassReverse
>Shme again, got time to ask pointless and annoying questions again.
>Current VirtualHost entry:
>	ServerAdmin	
>	ServerName
>	Port 8080
>	DocumentRoot /webuser/swazitelecoms
>	ProxyPass /
>	ProxyPassReverse /
>However, when I access the url I
>get a Bad Request error. The browser also tends to append the
>following to the URL:
>What I am trying to get done here, is have apache proxy any and all
>requests for a specific url to the tomcat server and let it deal with
>the jsps and servlets. However, I do not want the URL to change
>whenever the start moving around on the tomcat server.
>Is the virtual host the correct path to take or is there something
>else I should be doing? I looked at the mod_rewrite.c module,
>unfortunately, I'm a little pressed for time in all this. Help would
>be greatly appreciated.
>Martyn Longhurst
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message