Answer the question
In order to leave comments, you need to log in
How to use ProxyPreserveHost in apache?
In Apache for the site mysiteA.com is registered
ProxyPass / mysiteB.com.
ProxyPass / mysiteB.com
ProxyPreserveHost on
Answer the question
In order to leave comments, you need to log in
Solution: since both sites are running on the same server, you can make ProxyPass through the localhost.
<VirtualHost 127.0.0.1:80>
ServerAlias mysiteB.com
DocumentRoot /var/www/
</VirtualHost>
<VirtualHost>
ServerName mysiteA.com
ProxyPreserveHost On
ProxyPass / http://127.0.0.1/
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question