httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikunj Virani" <>
Subject Re: [users@httpd] Problems with virtual hosting
Date Tue, 04 Mar 2003 13:48:13 GMT

>>Anyway still I have a minor problem. In both cases where it is working,
after I am connected to the webmail service I get in >>Internet Explorer in
the address bar the http://yourExternalIP:3000, so it replaces me the alias.
Instead I would like to keep >> the alias in the address bar, so that
http://yourExternalIP:3000 is hid from the users.

Unforunately, you need the second one of the three given to work for you to
hide from the customers yourExternalIP:3000. I am not sure why the second
one did not work for you. Can you send me what errors do u get while trying
to use the second one ?

Note: Just make sure you have both mod_rewrite and mod_proxy module enabled
while using the second VirtualHost configurations.

Try this one. Confirm again you need both mod_rewrite module and mod_proxy
module to work for this.

<VirtualHost yourexternalIP:80>
 ProxyRequests On
 RewriteEngine On
 RewriteRule (.*) http://yourExternalIP:3000$1 [P]

>On the other hand, I am still courius, why it is not working with ProxyPass
and ProxyPassReverse?

I am not sure what errors you get while using ProxyPass. can you cross check
your Proxy module ? It could be a problem with your proxy module as if
"RewriteRule (.*) http://yourExternalIP:3000$1 [R]" works for you, most
often then not mod_rewrite is compiled and working.

>And I also would like to know, why it is not working also with rewrite [P]?
What do u get on apache logs ? rewrite [P] needs both mod_proxy as well as
mod_rewrite to work properly. It seems you have problem with mod_proxy.

>BTW what is the difference between the rewrite [P] and [R] and simple

Courtesy :

'redirect|R [=code]' (force redirect)
Prefix Substitution with http://thishost[:thisport]/ (which makes the new
URL a URI) to force a external redirection. If no code is given a HTTP
response of 302 (MOVED TEMPORARILY) is used.

proxy|P' (force proxy)
This flag forces the substitution part to be internally forced as a proxy
request and immediately (i.e., rewriting rule processing stops here) put
through the proxy module. You have to make sure that the substitution string
is a valid URI (e.g., typically starting with http://hostname) which can be
handled by the Apache proxy module. If not you get an error from the proxy
module. Use this flag to achieve a more powerful implementation of the
ProxyPass directive, to map some remote stuff into the namespace of the
local server.
Notice: To use this functionality make sure you have the proxy module
compiled into your Apache server program. If you don't know please check
whether mod_proxy.c is part of the ``httpd -l'' output. If yes, this
functionality is available to mod_rewrite. If not, then you first have to
rebuild the ``httpd'' program with mod_proxy enabled.

This directive makes the client know that the Redirect is permanent (status
301). Exactly equivalent to Redirect permanent.

Hope this helps!!

Nikunj Virani
Senior System Administrator

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