I have a wordpress site on different machine behind nginx reverse proxy. The remote host is 10.0.1.1/kehitys/testi/wordpress and I would like to serve this out as www.host.com/. Is there some way to configure nginx to remove the /kehitys/testi/wordpress/ from the URLs and such returned by the remote server?
My config looks like this:
location / {
rewrite /(.*) /kehitys/testi/wordpress/$1 break;
proxy_pass http://10.0.1.10;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect http://10.0.1.10/kehitys/testi/wordpress/ /;
proxy_bind 10.0.1.1;
proxy_pass_header Set-Cookie;
}