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: Need help with Proxy Pass/ Proxy Pass Reverse
Author
jbrandt



Joined: 10 Jun 2013
Posts: 1
Location: Harrisburg, PA

PostPosted: Mon 10 Jun '13 22:00    Post subject: Need help with Proxy Pass/ Proxy Pass Reverse Reply with quote

I'm using the isapi rewrite module for iis 6 which uses the exact same syntax as mod_rewrite in apache. I'm not very well versed in apache and need help getting this to work asap.

Basically I have a directory in our website:

www.xyz.edu/folder

I need to forward this to an IP address, for example to this address:

100.12.33.45/folder

While keeping the original URL (www.xyz.edu/folder). I'm unsure of the apache syntax for this and would appreciate any help.

Thanks!
Back to top
Steffen
Moderator


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

PostPosted: Tue 11 Jun '13 10:38    Post subject: Reply with quote

Try in httpd.conf of site www.xyz.edu:

ProxyRequests Off
ProxyPass /folder http://100.12.33.45/folder
ProxyPassReverse /folder http://100.12.33.45/folder

When you use a vhost for www.xyz.edu, add it to the vhost container.


Steffen
Back to top
Millennium



Joined: 17 Apr 2006
Posts: 179
Location: Leiderdorp, NL, EU

PostPosted: Tue 11 Jun '13 13:35    Post subject: Reply with quote

Don't think ProxyPass will work in ISAPI Rewrite...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7404
Location: EU, Germany, Next to Hamburg

PostPosted: Tue 11 Jun '13 15:10    Post subject: Reply with quote

That is a situation when you should not use rewrite but a reverse proxy.

https://httpd.apache.org/docs/2.4/rewrite/avoid.html


However with rewrite it would be

Code:

RewriteEngine on
rewriterule ^/folder/(.*) http://http://100.12.33.45/folder /$1 [P,L]


NOT TESTED (TM)
Back to top


Reply to topic   Topic: Need help with Proxy Pass/ Proxy Pass Reverse View previous topic :: View next topic
Post new topic   Forum Index -> Apache