Seems to be a few redirect issues I am seeing. Seems the problems are within the /var/lib/docker/volumes/global-nginx-proxy_confd/_data/testsite.com-redirect.confg settings.
After setting up a test site with the below command wordpress is setup correctly and runs without issue. Unless you want to set your URL to www.testsite.com. If you set the WordPress Address and Site Address to https://www.testsite.com your site will now be stuck in a 301 redirect loop. The default settings in the conf file also cause redirect problems with http to https, non-www to www, www to non-www.
ee site create testsite.com --type=wp --ssl=le --cache
I am sure this isn’t the ideal way to fix the issue but below is the info I had to change to get all the redirect issues to stop.
server {
listen 80;
server_name testsite.com www.testsite.com;
return 301 https://www.testsite.com$request_uri;
}
server {
listen 443;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers '*******';
ssl_prefer_server_ciphers on;
ssl_session_timeout 5m;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
ssl_certificate /etc/nginx/certs/testsite.com.crt;
ssl_certificate_key /etc/nginx/certs/testsite.com.key;
server_name testsite.com;
return 301 https://www.testsite.com$request_uri;
}