Ravish Agarwal wrote:
> Hi All,
>
>
>
> We are using apache WebServer version 2.0.55 on HP-UX version 11iand
> we are trying to redirect the requests to another WebServer on the
> same host
>
>
>
> We have made the following entries in the httpd.conf file.
>
>
>
> ProxyRequests On
>
> ProxyPass /metso http://mgtpdma3.rau.valmet.com:7003/metso
>
>
>
> ProxyPassReverse /metso http://mgtpdma3.rau.valmet.com:7003/metso
>
> SetEnv proxy-nokeepalive 1
>
> ProxyPreserveHost On
>
> RewriteCond %{REQUEST_URI}
> (.*\.jsp$)|(.*/servlet/.*)|(.*/workspace/.*)|(.*\.do$)
>
> RewriteRule ^/metso/(.*) http://mgtpdma3.rau.valmet.com:7003/metso/$1 [P].
>
>
>
>
>
> But this returns the http-404 message. Entries in the rewrite.log says
>
> 192.168.251.204 - - [06/Jul/2006:13:08:21 +0300]
> [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (2) init
> rewrite engine with requested uri /metso/login.jsp
>
> 192.168.251.204 - - [06/Jul/2006:13:08:21 +0300]
> [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (3)
> applying pattern '^/metso/(.*)' to uri '/metso/login.jsp'
>
> 192.168.251.204 - - [06/Jul/2006:13:08:21 +0300]
> [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (2)
> rewrite /metso/login.jsp ->
> http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
>
> 192.168.251.204 - - [06/Jul/2006:13:08:21 +0300]
> [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (2)
> forcing proxy-throughput with
> http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp
>
> 192.168.251.204 - - [06/Jul/2006:13:08:21 +0300]
> [mgtpdma3.rau.valmet.com/sid#400aeb58][rid#4030d888/initial] (1)
> go-ahead with proxy request
> proxy:http://mgtpdma3.rau.valmet.com:7003/metso/login.jsp [OK]
>
>
>
> But the loging page is not shown at all.
>
>
>
> However it we remove the [P] tag. Then the external redirection works
> fine. But our requirement is to do the redirection through internal
> proxy so that end-user does know about the same.
>
>  httpd -I shows the following output.
> $ ./httpd -l
> Compiled in modules:
>   core.c
>   worker.c
>   http_core.c
>   mod_so.c
> Do we need to have mod_proxy.c as a compiled module for this
> functionality with apache 2.0.55???

>From the manual page:

"'proxy|P' (force proxy)
This flag forces the substitution part to be internally sent as a proxy
request and immediately (rewrite processing stops here) put through the
proxy module. You must make sure that the substitution string is a valid
URI (typically starting with http://hostname) which can be handled by the
Apache proxy module. If not, you will get an error from the proxy module.
Use this flag to achieve a more powerful implementation of the ProxyPass
directive, to map remote content into the namespace of the local server.

Note: mod_proxy must be enabled in order to use this flag."

Besides mod_proxy, you need the protocol specific submodules too. If
you're reverse proxying to http, add mod_proxy_http, if you're proxying to
https, load mod_ssl and enable ssl proxying (SSLProxyEngine on) (and for
2.2, if you're proxying to ajp, you need mod_proxy_ajp)

Joost


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to