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: Redirects
Author
LOB99



Joined: 04 May 2017
Posts: 1
Location: USA, Wilmington

PostPosted: Thu 18 May '17 22:32    Post subject: Redirects Reply with quote

Hi all,

Fairly new to Apache and redirects and I'm having a hard time accomplishing what I need to do.

Basically, we need to call a URL from Server A that resides on Server B. Server B needs to redirect the traffic to Server C, but it needs to look like the traffic originated from Server B, not Server A. Server B is where Apache resides. Server A resides in a large datacenter and we cannot predict the IP the traffic will come from, and the 3rd party that hosts Server C did not feel comfortable whitelisting entire blocks of public IPs.

All we are really using this particular Apache server for is rewriting traffic to backend servers, as well as external servers. The external redirect is what is not working properly.

So, the best way I have found is by using ProxyPass in ssl.conf. Works perfectly, but the traffic looks like it originated from Server A and Server A is not whitelisted for the reasons stated above.

This is what I want:

Server A calls https://mysite.com/url and is redirected to https://theirsite.com/url.

This is what is in ssl.conf:

ProxyPass "/url" "https://theirsite.com/url
ProxyPassReverse "/url" "https://thiersite.com/url"

The above works perfectly, but it looks like the traffic originated from Server A. What am I doing wrong?
Back to top
James Blond
Moderator


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

PostPosted: Wed 28 Jun '17 17:48    Post subject: Reply with quote

That is because of the reverse proxy situtation. mod_remoteip can help to fix that issue. On Linux there is also mod_rpaf available.
Back to top


Reply to topic   Topic: Redirects View previous topic :: View next topic
Post new topic   Forum Index -> Apache