Nginx conf wont work

I am working with docker but it doesnt seem to be the problem. The problem seems to come from Nginx conf.


  • Must I create a tunnel to access a docker container on another host?
  • Docker Volume Containers for database, logs and metrics
  • Docker unable to start, new network adapter created on every restart
  • Linked docker containers can't communicate with each other
  • udhcpc failed to get a DHCP lease GNS3
  • Creating topics, but getting Kafka FailedPayloadsError with Python on Kubernetes
  • user www-data;
    worker_processes 4;
    pid /run/;
    events {
      worker_connections  2048;
      multi_accept on;
      use epoll;
    http {
      server_tokens off;
      sendfile on;
      tcp_nopush on;
      tcp_nodelay on;
      keepalive_timeout 15;
      types_hash_max_size 2048;
      include /etc/nginx/mime.types;
      default_type application/octet-stream;
      access_log off;
      error_log off;
      gzip on;
      gzip_disable "msie6";
      include /etc/nginx/conf.d/*.conf;
      #include /etc/nginx/sites-enabled/*;
      open_file_cache max=100;


    server {
        server_name  localhost;
        #charset koi8-r;
        #access_log  /var/log/nginx/log/host.access.log  main;
        location / {
            root   /var/www/symfony;
            index  about.html;
        #error_page  404              /404.html;
        # redirect server error pages to the static page /50x.html
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   /usr/share/nginx/html;


    The path to /var/www/symfony exists and contains an index.html.
    When I try http://localhost:80 I got the default page of Nginx /usr/shar/nginx/index.html, but I dont know why.

    My Docker-compose

        build: ./php
            - ~/Dev_Perso/Movies/App/www:/var/www/symfony
            - ~/Dev_Perso/Movies/App/logs:/var/www/symfony/app/logs
            - "9000"
        image: nginx:1.11.1
            - "80:80"
            - ~/Dev_Perso/Movies/nginx/conf/conf.d:/etc/nginx/conf.d
            - ~/Dev_Perso/Movies/nginx/conf/sites-enabled:/etc/nginx/sites-enabled
            - ~/Dev_Perso/Movies/nginx/nginx.conf:/etc/nginx/nginx.conf
            - php
            - php

  • How can I make docker-compose build an image from a remote git repository?
  • Docker - Why is this express.js container with an exposed/published port reject connections? (using boot2docker)
  • docker : container exited when using -v option
  • Docker run java app
  • `docker run -v` doesn't work as expected
  • set hostname service docker swarm
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.