Question
nginx as proxy to wordpress
I’m trying to use nginx as a proxy to wordpress but I’m getting weird behavior.
There is my nginx configuration:
location ~ ^/blog(/?)(.*) {
proxy_pass http://<ip addr>/$2$is_args$args;
proxy_redirect off;
}
When I access www.hostname.com/blog/
, I receive a redirect (301) to <ip addr>/blog/
.
I checked the apache’s access.log and there is no record of the redirects, what makes me believe that is nginx that is doing that.
Any idea of what could be causing this?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×