I am not sure if this is an nginx config issue, a traefik config issue, or a general docker networking issue.
I assume there is a simple setting somewhere that will make it possible.
I have etopian/alpine-php-wordpress running great behind traefik.
Simply Static is a wordpress plugin that crawls the site and adapts the results into a static site with relative paths. To do that Wordpress needs to be able to "make requests to itself", and the Simply Static Diagnostic page gives me a red X because it can't.
I tried some commandline wgets from within the container:
bash-4.3# wget http://edit.example.com
Connecting to edit.example.com (172.24.x.y:80)
wget: error getting response: Invalid argument
bash-4.3# wget https://edit.example.com
Connecting to edit.example.com (172.24.x.y:443)
wget: can't connect to remote host (172.24.x.y): Connection refused
bash-4.3# wget https://edit.example.com:80
Connecting to edit.example.com:80 (172.24.x.y:80)
wget: can't execute 'ssl_helper': No such file or directory
wget: error getting response: Connection reset by peer
I also tried adding an extra host to docker-compose:
extra_hosts:
- "edit.example.com:{{actual.ip.add.ress}}
Still fails, but the IP address shown in the Simply Static Diagnostics changes to the external actual ip of the machine (hardcoded where i put {{actual.ip.add.ress}} above).
These results make me lean towards an nginx config fix. As it seems that edit.adanj.com is correctly resolved to the internal (or external) ip of the docker container, and nginx is not allowing the connection.
Any help?