Search code examples
wordpressapachehttp-redirectmod-proxy

Mod_proxy redirect http://domain.com/ to http://192.168.1.10/wordpress


I am trying to use apache2 mod_proxy to redirect http://domain.com/ to http://192.168.1.10/wordpress

<VirtualHost *:80>
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
    Order allow,deny
    Allow from all
</Proxy>
ProxyPass / http://192.168.1.10/wordpress/
ProxyPassReverse /wordpress/ http://192.168.1.10/
ServerName domain.com
ServerAlias *domain.com
</VirtualHost>

However, when I visit domain.com in a web browser I am automatically redirected to domain.com/wordpress

What am I doing wrong?


Solution

  • Try this

    ProxyPass / http://192.168.1.10/wordpress/
    ProxyPassReverse / http://192.168.1.10/wordpress/
    

    I am almost positive the Reverse calls it and reroutes it.