unknown directive "max_fails=3"
Able2Code opened this issue · 4 comments
Hi, using the wordpress.yml and changing the env file to mine, nginx container trow this error:
unknown directive "max_fails=3" in /etc/nginx/upstream.d/php-fpm.conf
my ENV
APP_DOCROOT=/usr/share/nginx/html
PHP_FPM_PORT=9000
PHP_START_SERVERS=16
PHP_MIN_SPARE_SERVERS=8
PHP_MAX_SPARE_SERVERS=16
PHP_MEMORY_LIMIT=256
PHP_OPCACHE_MEMORY_CONSUMPTION=96
PHP_MAX_CHILDREN=16
NGINX_DOCROOT=/usr/share/nginx/html
NGINX_SERVER_NAME=testserver
NGINX_CONFIG=php
NGINX_DEV_INSTALL=true
my YML
version: '3.1'
services:
nginx:
image: openbridge/nginx
container_name: nginx
ports:
- 80:80
- 443:443
tty: true
tmpfs:
- /var/cache
volumes:
- db_data:/usr/share/nginx/html
ulimits:
nproc: 65535
nofile:
soft: 49999
hard: 99999
env_file:
- ./env/stage.env
mariadb:
image: mariadb:latest
container_name: mariadb
environment:
MYSQL_ROOT_PASSWORD: Pettinell@2009
MYSQL_DATABASE: mapsgra
MYSQL_USER: root
MYSQL_PASSWORD: Pettinell@2009
tty: true
volumes:
- db_data:/var/lib/mysql
ulimits:
nproc: 65535
nofile:
soft: 49999
hard: 99999
php-fpm:
image: openbridge/ob_php-fpm
container_name: php-fpm
restart: always
depends_on:
- mariadb
env_file:
- ./env/stage.env
ports:
- 9001:9000
tmpfs:
- /var/cache
tty: true
volumes:
- db_data:/usr/share/nginx/html
ulimits:
nproc: 65535
nofile:
soft: 49999
hard: 99999
redis:
image: redis
container_name: redis
restart: always
volumes:
db_data:
Hi, testserver
is not a valid name for NGINX. A valid server name is something that resolves to an address, like localhost
or apple.com
or dell.com
. It won't know what to do with something like testserver
Also, this issue might be better handled in the NGINX project
Here is the sample config for PHP from the NGINX server. Notice PHP_FPM_UPSTREAM=localhost:9000
is set to the location where you have PHP deployed. NGINX needs to know where PHP is located so without this it will error. Maybe share the ENV you are using for NGINX?
NGINX_SERVER_NAME=localhost
NGINX_APP_PLUGIN=
NGINX_CONFIG=php
NGINX_DEV_INSTALL=true
PHP_FPM_UPSTREAM=localhost:9000
REDIS_UPSTREAM=redis:6379
NGINX_PROXY_UPSTREAM=localhost:8080
NGINX_DOCROOT=/usr/share/nginx/html
NGINX_CDN_HOST=cdn.myhost.com