httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
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 http://qit-soldev.telkom.co.za:8080/ gets into apache
correctly and the ProxyPass directive causes apache to request
http://165.143.101.4:8000 (i.e. tomcat).
- This is a request without a trailing slash, so tomcat responds with a
redirect to http://165.143.101.4:8000/index.jsp.
- Apache gets the redirect and, because of the PRoxyPassReverse
directive, converts it to a redirect to
http://qit-soldev.telkom.co.za:8080/index.jsp which it sends to the
browser.
- 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 / http://165.143.101.4:8000/
	ProxyPassReverse / http://165.143.101.4:8000/

(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
href="http://165.143.101.4:8000/mydir/mypage.jsp".

Rgds,

Owen Boyle

>-----Original Message-----
>From: Martyn Longhurst (MJ) [mailto:LonghuJM@telkom.co.za]
>Sent: Freitag, 29. November 2002 06:35
>To: users@httpd.apache.org
>Subject: [users@httpd] ProxyPassReverse
>
>
>'ello
>
>Shme again, got time to ask pointless and annoying questions again.
>
>Current VirtualHost entry:
>
><VirtualHost 165.143.101.4>
>	ServerAdmin longhujm@telkom.co.za	
>	ServerName qit-soldev.telkom.co.za
>	Port 8080
>	DocumentRoot /webuser/swazitelecoms
>	ProxyPass / http://165.143.101.4:8000
>	ProxyPassReverse / http://165.143.101.4:8000
></VirtualHost>
>
>However, when I access the url http://qit-soldev.telkom.co.za:8080/ I
>get a Bad Request error. The browser also tends to append the
>following to the URL: http://qit-soldev.telkom.co.za:8080//index.jsp
>
>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.
>
>Regards,
>Martyn Longhurst
>
>
>---------------------------------------------------------------------
>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
>
>

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