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: How to leave "Location" unchanged on Apache proxy?
Author
yjf_victor



Joined: 04 Nov 2021
Posts: 1
Location: Shenzhen

PostPosted: Thu 04 Nov '21 10:26    Post subject: How to leave "Location" unchanged on Apache proxy? Reply with quote

Code:
ProxyRequests Off

<Proxy *>
  Order deny,allow
  Allow from all
</Proxy>


ProxyPass / http://www.something.com/
<Location />
  ProxyPassReverse /
  Order deny,allow
  Allow from all     
</Location>


However, when it sends "HTTP/1.1 302 Found" together with "Location: http://www.test.com/", it is changed to "Location: http://www.mydomainname.com/", so how can I leave the "location" line unchanged?
Back to top
James Blond
Moderator


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

PostPosted: Tue 09 Nov '21 22:41    Post subject: Reply with quote

a reverse proxy may look like

Code:

<VirtualHost *:80>
        ServerName www.test.com
        DocumentRoot /var/www

        <Directory /var/www>
                Options FollowSymLinks
                AllowOverride None
                Require all granted
        </Directory>

        ProxyPass / http://www.something.com/
        ProxyPassReverse / http://www.something.com/
</VirtualHost>

if the location still changes the reversed host forces the other location.
Back to top


Reply to topic   Topic: How to leave "Location" unchanged on Apache proxy? View previous topic :: View next topic
Post new topic   Forum Index -> Apache