ERR_EMPTY_RESPONSE with docker and nginx

I have a problem with my docker and nginx config ?

Everything is running but my web page return a ERR_EMPTY_RESPONSE

Here is my nginx config :

server {
listen 8443;

server_name api.test.dv;
root /api/public;

location / {
    try_files $uri /index.php$is_args$args;
}

location ~ ^/index.php(/|$) {
    fastcgi_pass php:9000;
    fastcgi_split_path_info ^(.+.php)(/.*)$;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
    fastcgi_param DOCUMENT_ROOT $realpath_root;
    fastcgi_buffer_size 32k;
    fastcgi_buffers 8 16k;
    internal;
}

location ~ .php$ {
    return 404;
}
}

My docker-compose :

version: "3"

services:
    nginx:
        image: "bitnami/nginx:latest"
        ports:
            - "11083:8443"
        volumes:
            - "./docker/nginx/vhost.conf:/opt/bitnami/nginx/conf/vhosts/app.conf"
            - .:/api
        depends_on:
            - php

    php:
        build: "docker/php"
        volumes:
            - .:/api:cached
        working_dir: /api
        user: 1000:1000
        depends_on:
            - database
            - redis

    database:
        image: "postgres:latest"
        environment:
            POSTGRES_PASSWORD: password
            POSTGRES_DB: app
        ports:
            - "11032:5432"

    redis:
        image: "redis:3.2.11"

nginx logs are good, no error.

I use docker desktop on mac os.

I have really no idea about my problem.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *