logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Reverse proxy & rewrite rule
Author
hacksandmore



Joined: 05 Mar 2012
Posts: 2
Location: Italy

PostPosted: Mon 05 Mar '12 15:10    Post subject: Reverse proxy & rewrite rule Reply with quote

Hello all!!
I'm going crazy with this configuration..hope some guru can give me the light...


We have this scenario:

internal web application server that respond to url:

http://myapp.myinternaldomain.com:8080/webapp/login.pgm

I need to give access to external users, so I've setup an apache webserver to act as reverse proxy with https. all is working well if i leave the path "untouched" like this config:



Code:
 ProxyPass / http://myapp.myinternaldomain.com:8150/
  ProxyPassReverse / http://myapp.myinternaldomain.com:8150/


But external users have to know the full path to the login page like https://myapp.myexternaldomain.com/webapp/login.pgm


I've tried to modify the configuration in this way:

Code:
 ProxyPass / http://myapp.myinternaldomain.com:8150/webapp/login.pgm
  ProxyPassReverse / http://myapp.myinternaldomain.com:8150/webapp/login.pgm


and the page is displayed, but without stylesheet and images, because the url is modified like

https://myapp.myexternaldomain.com/webapp/login.pgmwebapp/csss/foo.css


there' a way to write a rewrite rule that can handle this problem?

one hint:
I can't change anything on internal webserver.




thank you very very much.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 05 Mar '12 16:53    Post subject: Reply with quote

You may have a look at mod_proxy_html, see http://apache.webthing.com/mod_proxy_html/

Included standard in Apache 2.4 and for 2.2 download it from here.


Steffen
Back to top
hacksandmore



Joined: 05 Mar 2012
Posts: 2
Location: Italy

PostPosted: Mon 05 Mar '12 16:54    Post subject: Reply with quote

I'm asking here beacure I have no answer reading the document..
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Mon 05 Mar '12 16:55    Post subject: Reply with quote

mod_proxy_html should solve your issue.

And read http://www.apachetutor.org/admin/reverseproxies

Steffen
Back to top


Reply to topic   Topic: Reverse proxy & rewrite rule View previous topic :: View next topic
Post new topic   Forum Index -> Apache