You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by st...@free.fr on 2006/02/09 12:52:31 UTC

[users@httpd] Rewrite rule with Servlet Issue


Hi Apache gurus,

I have got Apache running on auohsepcb11.oracleoutsourcing.com:10280
The site is accesible thorugh URL oexdev.oracleoutsourcing.com with is the BIG
IP mapping to the Internal
auohsepcb11.oracleoutsourcing.com:10280

When I try to setup rewriting like that:
<VirtualHost *>
ProxyRequests On
RewriteEngine on
RewriteLog /techned/app/a_techned/apache/logs/rewrite.log
RewriteLogLevel 9
RewriteRule ^/cgi-bin/java\-rmi\.cgi$
http://oexdev.oracleoutsourcing.com/servlet/ServletHandler [P]
</VirtualHost>

This is not working though I can access the URL
http://oexdev.oracleoutsourcing.com/servlet/ServletHandler using my browser
When I configure with the following with the real machine name It works.
<VirtualHost *>
ProxyRequests On
RewriteEngine on
RewriteLog /techned/app/a_techned/apache/logs/rewrite.log
RewriteLogLevel 9
RewriteRule ^/cgi-bin/java\-rmi\.cgi$
http://auohsepcb11.oracleoutsourcing.com:10280/servlet/ServletHandler [P]
</VirtualHost>

But the server response is not returned to the initial client. which calls
http://oexdev.oracleoutsourcing.com/cgi-bin/java-rmi.cgi

Could you please explain what is wrong.

Regards
JO

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


Re: [users@httpd] Rewrite rule with Servlet Issue

Posted by st...@free.fr.
Hi,

Thank your for your response.
Here is the source where I get those directives:
http://www.geocities.com/dmh2000/ApacheTomcatRMI.htm
What I try to achieve is to implement HTTP tunneling for RMI.
I implemented it successfully on my laptop locally.
I have Apache2/Tomcat and latest jdk.

But When I try to implement it with the target environment I am encountering
this issue.

1)The JAVA client can make calls to Internet without any proxy.
2)HTTP tunneling only works with port 80 because it is harcoded in sun client
libraries.(see java-rmi.cgi doc)
3)On the server side the http://oexdev.oracleoutsourcing.com/ maps to
http://auohsepcb11.oracleoutsourcing.com:10280/
Something on the server side does the trick (Reverse proxy..I do not know
exactly)
So the idea first was to make:
RewriteRule ^/cgi-bin/java\-rmi\.cgi$
http://oexdev.oracleoutsourcing.com/servlet/ServletHandler [P]

as explained by RMI-HTTP tunnel docs
But the issue is that with this configuration the servlet is not called though
the rewrite.log shows that rewrite is correctly handled.(Issue A)
(Note that escaping the - is working and is recommended  as it is a reserverd
char (see http://www.geocities.com/dmh2000/ApacheTomcatRMI.htm))

It is important to pint it that RMI server runs with the real on
hostname:auohsepcb11.oracleoutsourcing.com on defaul port 1099



So the only way to make the servlet called is to use the configuration below:
RewriteRule ^/cgi-bin/java\-rmi\.cgi$
http://auohsepcb11.oracleoutsourcing.com:10280/servlet/ServletHandler [P]
 Servlet is called ... open the socket to the RMI server ...
get reponse from RMI server ... and write the DATA to servlet response but at
this step the response is not returned to the client.(Issue B)


I hope I am enough clear.
I have the feeling that if Issue A was solved it should do the trick but
With Issue B I am a bit further and have the feeling that I am near the solution
If I could ensure that servlet response is returned to the client.

Thanks
JO


Quoting Joshua Slive <jo...@slive.ca>:

> On 2/9/06, stepabest@free.fr <st...@free.fr> wrote:
> >
> > RewriteRule ^/cgi-bin/java\-rmi\.cgi$
> > http://auohsepcb11.oracleoutsourcing.com:10280/servlet/ServletHandler [P]
> > </VirtualHost>
> >
> > But the server response is not returned to the initial client. which calls
> > http://oexdev.oracleoutsourcing.com/cgi-bin/java-rmi.cgi
>
> I can't decipher that.  What actually happens?
>
> In addition, I don't see why you are escaping the - character.  I
> don't think that is what you want.
>
> Joshua.
>
> ---------------------------------------------------------------------
> 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
>
>



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


Re: [users@httpd] Rewrite rule with Servlet Issue

Posted by Joshua Slive <jo...@slive.ca>.
On 2/9/06, stepabest@free.fr <st...@free.fr> wrote:
>
> RewriteRule ^/cgi-bin/java\-rmi\.cgi$
> http://auohsepcb11.oracleoutsourcing.com:10280/servlet/ServletHandler [P]
> </VirtualHost>
>
> But the server response is not returned to the initial client. which calls
> http://oexdev.oracleoutsourcing.com/cgi-bin/java-rmi.cgi

I can't decipher that.  What actually happens?

In addition, I don't see why you are escaping the - character.  I
don't think that is what you want.

Joshua.

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