I have new wordpress website and existing rails app on two different servers. I wanted my wordpress website to be https://example.com/blog
My current nginx config for mydomain.com is
location /blog {
proxy_pass http://<ip-address of wp server>;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
My wordpress config is
$_SERVER['HTTPS'] = 'on';
define('WP_HOME', "https://example.com/blog");
define('WP_SITEURL', "https://example.com/blog");
Everything is working fine(admin and home page) But when i click on post-page on hover its showing right url which is https://example.com/blog/post but its redirecting to https://example.com/post