Hi!
I am struggling with the problem that the request from traefik does not arrive in NGINX. I get a Gateway Timeout error in my browser. On the console in the log, I do not see any incoming connection from the traffic in the access log.
Everything runs on my VPS. Can anyone tell me what I'm doing wrong?
This is my configurations:
version: '3.9'
services:
reverse-proxy:
container_name: satur-reverse-proxy
image: traefik:v2.9
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- satur-proxy
command:
- --global.sendanonymoususage=false
- --api.dashboard=true
- --api.insecure=true
- --log.level=DEBUG
- --log.filepath=/var/log/traefik.log
- --accesslog=true
- --accesslog.filepath=/var/log/traefik-access.log
- --providers.docker.network=satur-proxy
- --providers.docker.exposedByDefault=false
- --entrypoints.web.address=:80
labels:
- traefik.enable=true
- traefik.http.routers.mydashboard.rule=Host(`admin.domain.tld`)
- traefik.http.routers.mydashboard.service=api@internal
/UJoJgmAk1
networks:
satur-proxy:
external: true
app.yaml
version: '3.9'
services:
app_php:
container_name: app_php
build:
context: ./docker/php
volumes:
- .:/var/www/symfony
- ../cdn/data:/data
- ~/.ssh:/root/.ssh:ro
networks:
- satur-proxy
app_nginx:
container_name: app_nginx
image: nginx:stable-alpine
labels:
- traefik.enable=true
- traefik.http.routers.app.rule=Host(`app.domain.tld`)
- traefik.http.routers.app.entrypoints=web
- traefik.http.services.app.loadbalancer.server.port=80
volumes:
- .:/var/www/symfony
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app_php
networks:
- satur-proxy
networks:
satur-proxy:
external: true
nginx.conf
upstream php-upstream {
server app_php:9000;
}
server {
listen 80;
index index.php;
server_name localhost;
root /var/www/symfony/public;
client_max_body_size 20M;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\\.php(/|$) {
fastcgi_pass php-upstream;
fastcgi_split_path_info ^(.+\\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
location ~ \.php$ {
return 404;
}
error_log "/var/log/nginx/error.log" debug;
access_log /var/log/nginx/project_access.log;
}