Hi there,
I have never been able to get this nginx subdomain work with the reverse proxy, I'm hoping that one of you lovely people can work out why.
The Traefik was setup exactly how it is from - https://medium.com/@containeroo/traefik-2-0-docker-a-simple-step-by-step-guide-e0be0c17cfa5 with the exact same configuration.
api:
dashboard: true
entryPoints:
http:
address: ":80"
https:
address: ":443"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
certificatesResolvers:
http:
acme:
email: contact@email.com
storage: acme.json
httpChallenge:
entryPoint: http
This is my docker-composer for the nginx container (removed mysql and pma from it)
version: '3'
services:
#Nginx Service
webserver:
image: nginx:alpine
container_name: echo_webserver
restart: unless-stopped
tty: true
labels:
- "traefik.enable=true"
- "traefik.http.routers.echo.rule=Host(`echo.domain.name`)"
- "traefik.http.routers.echo.entrypoints=http"
- "traefik.docker.network=proxy"
# - "traefik.http.services.echo.loadbalancer.server.port=81"
# ports:
# - "81"
volumes:
- ./:/var/www
- /nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
- proxy
#Docker Networks
networks:
app-network:
driver: bridge
proxy:
external: true
I have completely ran out of ideas, on the Traefik dashboard the route itself says "success" and Portainer reports that the nginx container has an IP address much like everything else. I've tried commenting out traefik labels, in the hope that one of them was causing it - but I'm not getting anywhere. It isn't a part of a swarm and is on its own as a DO droplet.
Within the nginx config, it is listening on port 80 - I think that's okay though!
I would be really appreciative of any assistance, it feels like I'm hitting a wall right now.