Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: How to leave "Location" unchanged on Apache proxy? |
|
Author |
|
yjf_victor
Joined: 04 Nov 2021 Posts: 1 Location: Shenzhen
|
Posted: Thu 04 Nov '21 10:26 Post subject: How to leave "Location" unchanged on Apache proxy? |
|
|
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
|
Posted: Tue 09 Nov '21 22:41 Post subject: |
|
|
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 |
|
|
|
|
|
|