Serve static files using docker, nginx, php-fpm
I think the problem, cause service nginx
can not find your web project. If you use docker-compose you can use volume
, but if not you can add folder project in nginx Dockerfile to /var/www/html
nginx dockerfile
ROM nginx:1.12.2COPY . /var/www/html/COPY ./default.conf /etc/nginx/conf.d/default.confEXPOSE 80
for docker compose like this :
services: nginx: images: nginx:latest ... ... volumes: - ./:/var/www/html php: images: php ... ... volumes: - ./:/var/www/html