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.

nginx.conf:

  • Boot2Docke init: boot2docker init error in run: Failed to initialize machine “boot2docker-vm”: exit status 1
  • Openshift Origin run-app against insecure registry yields stuck pod with “Error while pulling image”
  • Solr running inside docker container is not connecting to PostgreSQL database
  • How do I integrate my git PHP repo into an official Docker Hub container?
  • Confused about docker pricing policy [closed]
  • Docker container data goes blank when mapped with host data directory
  • user www-data;
    worker_processes 4;
    pid /run/nginx.pid;
    
    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;
    }
    

    default.conf:

    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

    php:
        build: ./php
        volumes:
            - ~/Dev_Perso/Movies/App/www:/var/www/symfony
            - ~/Dev_Perso/Movies/App/logs:/var/www/symfony/app/logs
        expose:
            - "9000"
    server:
        image: nginx:1.11.1
        ports:
            - "80:80"
        volumes:
            - ~/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
        volumes_from:
            - php
        links:
            - php
    

  • Writing a .env file to include OAuth credentials for Docker
  • How to set hwaddr in docker 0.9.x
  • Storing submodules for micro services, but still using forks
  • How can write Dockerfile to start a webserver and curl it for some requirements
  • Cannot link to a running container started by docker-compose
  • Having issue setting up access token from policy in Vault
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.