LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [Resolved] ProxyPass Configuration using Proxy in Litespeed

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2010, 03:40 AM
Elik Elik is offline
Member
 
Join Date: Nov 2009
Posts: 24
Default [Resolved] ProxyPass Configuration using Proxy in Litespeed

Hello,

I have been trying to setup the tomcat proxy so that person can use tomcat to pass it to Tomcat. I have setup in the External App the setting for Tomcat to be proxied at port 8080 using Webserver Setting.

Then I add in the .htaccess this line:

RewriteEngine On
RewriteRule ^/(.*)$ http://127.0.0.1:8080/$1 [L,P,QSA]

But it does not work, since it give error 500 when I tried it. I used the information I found from the forum to do the Reverse Proxy so I can redirect requests to tomcat for servlets, and such, and it is not working properly as it should be for it. So...any help here?

Note that it fails since it could not find the file, home.do in the directory, but tomcat picks it up when tried directly, but not from litespeed proxy itself.

Here is the reference link to the other post, which I used to setup the Tomcat Proxy which it did not work for it. http://www.litespeedtech.com/support...ead.php?t=2879

Last edited by NiteWave; 05-11-2010 at 06:10 PM.. Reason: Additional Info
Reply With Quote
  #2  
Old 05-11-2010, 08:10 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
Maybe you've missed the last post in that thread?

repost it here:
Quote:
Originally Posted by mistwang View Post
Code:
RewriteRule (.*) http://127.0.0.1:port/$1 [p]
should work.
You have to remove the leading '/' if you use the rewrite rule in .htaccess.
Reply With Quote
  #3  
Old 05-11-2010, 08:54 AM
Elik Elik is offline
Member
 
Join Date: Nov 2009
Posts: 24
I did that. It does not work with or without it with that Rewrite Rule part for it to proxy it. The problem is that Litespeed do not recognize the non-existant filename like home.do which is mapped by the servlet to have it load.

Here is the example site:

Non-Working: http://vishalwedsaditi.com/home.do
Working: http://vishalwedsaditi.com:8080/home.do

Last edited by Elik; 05-11-2010 at 08:57 AM..
Reply With Quote
  #4  
Old 05-11-2010, 09:48 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
Code:
I have setup in the External App the setting for Tomcat to be proxied at port 8080 using Webserver Setting.
assume the external app name is tomcat_backend. Please try following instead:
Code:
RewriteEngine On
RewriteRule (.*) http://tomcat_backend/$1 [L,P,QSA]
I did similar test locally, and passed.
Reply With Quote
  #5  
Old 05-11-2010, 10:01 AM
Elik Elik is offline
Member
 
Join Date: Nov 2009
Posts: 24
Default Thanks

Now we getting somewhere with this. Now I able to get it passed to Tomcat with that example. Now I gotta see how to get tomcat to recognize the home.do as well for it to load.

Nevermind, seems the client been mucking around with it, causing it not to load at this point, but the tomcat proxy is working properly now. I appreciate the help!

Last edited by Elik; 05-11-2010 at 10:06 AM..
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:04 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.