Have an Apache install on our main webserver that needs to redirect all traffic for http://www.mydomain.com to another Apache server that is hosting a WordPress site. The main page renders but all nested pages show the local ip address of the hosting server instead of the domain name (ex. 192.168.2.5:81/aboutus/). I have done this before redirecting to an IIS site and it works.
The VirtutalHost on the main webserver looks like this:
<VirtualHost 192.168.2.4:80>
ServerAdmin me@gmail.com
ServerName www.mydomain.com
ServerAlias mydomain.com
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass /wodpresssite/ http://192.168.2.5:81/wodpresssite/
ProxyPassReverse /wodpresssite/ http://192.168.2.5:81/wodpresssite/
ProxyPass / http://192.168.2.5:81/wodpresssite/
ProxyPassReverse / http://192.168.2.5:81/wodpresssite/
</VirtualHost>
VirtualHost on other server that hosts new WordPress site:
local ip address of this machine is 192.168.2.5
<VirtualHost *:81>
ServerName wordpresssite
DocumentRoot "c:/wamp64/www/wordpresssite"
<Directory "c:/wamp64/www/wordpresssite/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Allow from all
Require all granted
</Directory>
</VirtualHost>