I'm setting up a local test instance, but I'm having trouble with one part of the setup. First the basics:
- WordPress is running in a docker container
- nginx is serving as a reverse proxy, providing SSL
This works 100% if I have the proxy path as "/", but I want to put it at "/wp/" so it doesn't conflict with other existing services. When I try to use the sub-path, I get an internal redirect loop:
[Sun Jul 28 15:43:23.855765 2024] [core:debug] [pid 41:tid 41] core.c(3968): [client 172.17.0.1:33772] AH00121: r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855769 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855772 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855775 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855778 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855781 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855784 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855787 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855790 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855793 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/index.php
[Sun Jul 28 15:43:23.855796 2024] [core:debug] [pid 41:tid 41] core.c(3974): [client 172.17.0.1:33772] AH00122: redirected from r->uri = /wp/
172.17.0.1 - - [28/Jul/2024:15:43:23 +0000] "GET /wp/ HTTP/1.1" 500 809 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0"
I though that was the purpose of wp_options.siteurl and wp_options.home. I've tried every combination of "https://<host>/" and "https://<host>/wp/" in those values (where <host> is my actual hostname), but nothing helps.
I've tried a bunch of other solutions I've found on google, but none of them have fixed it.
I feel like this is a WordPress configuration problem, but here's my nginx location for completeness.
location /wp/ {
proxy_pass http://localhost:3380;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Scheme https;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}

Sounds like you’ve got a config issue with your .htaccess or maybe your proxy server. Check your rules and make sure subpaths are directed properly. Could be an infinite loop if not set right. Look into WP’s site URL settings too.