title: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
body: <p>Hello guys trying to configurate my webserver using nginx and php5-fpm.</p>
  
  <p>When i try to restart/start/stop nginx it shows:</p>
  
  <pre><code>Restarting nginx: 
  nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
  nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
  nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
  nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
  nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
  nginx: [emerg] still could not bind()
  nginx.
  </code></pre>
  
  <p>Logs show the same thing. </p>
  
  <p>My site configs:</p>
  
  <pre><code>server {
  
              listen   80;
  
              listen   [::]:80;
  
              root /home/marker/Projects/stereoshoots/www;
  
              server_name stereoshoots.local;
  
  
  
  
  
  
  
              location / {
  
                      autoindex  on;
  
      #                try_files $uri $uri/ @rewrite;
  
                      try_files $uri $uri/ /index.php;
  
              }
  
      #        location @rewrite {
  
      #                rewrite ^/(.*)$ /index.php?q=$1;
  
      #        }
  
              location ~* \.(jpg|jpeg|gif|css|png|js|ico|xml|txt)$ {
  
                  access_log        off;
  
                  expires           30d;
  
              }
  
              location = /favicon.ico {
  
                      return 204;
  
                      access_log     off;
  
                      log_not_found  off;
  
              }
  
              location ~ \.php$ {
  
                      fastcgi_pass unix:/var/run/php5-fpm.sock;
  
                      fastcgi_index index.php;
  
                      include fastcgi_params;
  
              }
  
              location ~ /\.ht {
  
                      deny all;
  
              }
  
      }
  </code></pre>
  
  <p>The list of commands i wrote in terminal, while was installing nginx+php5-fpm</p>
  
  <pre><code>1.sudo apt-get install nginx
  2.sudo apt-get install php5-cli php5-common php5-mysql php5-suhosin php5-gd php5-fpm php5-cgi php5-fpm php-pear php5-mcrypt
  3.sudo service nginx stop
  4.sudo service php5-fpm stop
  5.sudo gedit /etc/php5/fpm/php.ini
  cgi.fix_pathinfo = 0;
  6.sudo gedit /etc/php5/fpm/pool.d/www.conf
  security.limit_extensions = .php .php3 .php4 .php5
  listen = /var/run/php5-fpm.sock
  </code></pre>