Hi,
I'm getting 404 not found
errors on my website's http requests whenever I setup letsencrypt
.
When disabling https
the site works fine...
What am I doing wrong ?
NOTE
I'm using acme's staging server but the outcome is the same using the production server
docker-compose
version: '3.7'
services:
database:
build: ./docker/database
restart: always
environment:
MYSQL_DATABASE: 'mobius'
# Password for root access
MYSQL_ROOT_PASSWORD: 'root'
networks:
- web
php-fpm:
build:
context: ./docker/php-fpm
depends_on:
- database
volumes:
- ./src:/var/www
networks:
- web
nginx:
container_name: mobius-nginx
build:
context: ./docker/nginx
volumes:
- ./src:/var/www
- ./docker/logs:/var/log/nginx
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/sites/:/etc/nginx/sites-available
- ./docker/nginx/conf.d/:/etc/nginx/conf.d
depends_on:
- php-fpm
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.mobius-nginx.rule=Host(`$TRAEFIK_HOST`)"
- "traefik.http.routers.mobius-nginx.tls=true"
- "traefik.http.routers.mobius-nginx.tls.certresolver=letsEncrypt"
volumes:
mobius-volume:
networks:
web:
external: true
traefik.yml
entryPoints:
web:
address: :80
websecure:
address: :443
dashboard:
certificatesResolvers:
letsEncrypt:
acme:
email: terence.pires@gmail.com
storage: acme.json
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
httpChallenge:
entryPoint: web
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
network: web
api:
dashboard: true
insecure: true
log:
level: "DEBUG"