Skip to content

502 Bad Gateway #78

@claudiu-cristea

Description

@claudiu-cristea

With this docker-compose.yml I'm receiving:

  • 502 Bad Gateway when accessing the site from host: http://localhost:8080
  • Accessing from the php container, I'm getting Recv failure: Connection reset by peer for "http://php:9000" (note that using port 80, it gives Failed to connect to php port 80)

Any clue?

version: "2"
services:
  php:
    image: wodby/drupal-php:8.1-4.37.12
    environment:
      DB_HOST: mariadb
      DB_USER: drupal
      DB_PASSWORD: drupal
      DB_NAME: drupal
      DB_DRIVER: mysql
      PHP_XDEBUG: 0
      PHP_FPM_USER: wodby
      PHP_FPM_GROUP: wodby
      PHP_FPM_CLEAR_ENV: "yes"
      PHP_OPCACHE_PRELOAD_USER: wodby
      PHP_XDEBUG_DEFAULT_ENABLE: 0
      PHP_XDEBUG_REMOTE_CONNECT_BACK: 1
      PHP_XDEBUG_REMOTE_HOST: "10.254.254.254"
      PHP_XDEBUG_IDEKEY: "PHPSTORM"
      PHP_IDE_CONFIG: "serverName=drupalextension"
    volumes:
      - ./:/var/www/html

  mariadb:
    image: wodby/mariadb:10.3-3.8.4
    stop_grace_period: 30s
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: drupal
      MYSQL_USER: drupal
      MYSQL_PASSWORD: drupal

  nginx:
    image: wodby/nginx:1.16-5.11.3
    depends_on:
      - php
    environment:
      NGINX_STATIC_OPEN_FILE_CACHE: "off"
      NGINX_ERROR_LOG_LEVEL: debug
      NGINX_BACKEND_HOST: php
      NGINX_BACKEND_PORT: 80
      NGINX_SERVER_ROOT: /var/www/html
      NGINX_VHOST_PRESET: drupal9
    volumes:
      - ./:/var/www/html
    ports:
      - "8080:80"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions