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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top