Hi Docker Pros, I can’t access to my root folder with port http request. It shows 404 not found, nginx/1.19.6. Docker compose working fine with local windows docker engine, but requesting same port can’t seem to access root folder on my VPS. How do I troubleshoot nginx conf problem?
default.conf
version: '3'
services:
web:
image: nginx:alpine
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/ssl:/etc/ssl"
- "./web:/var/www/html"
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
ports:
- "8000:80"
- "3000:443"
environment:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
depends_on:
- php
- mysqldb
php:
image: nanoninja/php-fpm:${PHP_VERSION}
restart: always
volumes:
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- "./web:/var/www/html"