title: nginx not listening to port 80
body: <p>I've just installed a Ubuntu 12.04 server and nginx 1.2.7, removed <code>default</code> from sites-enabled and added my own file into <code>sites-available</code> and symlink at <code>sites-enabled</code>. Then restarted nginx.</p>
  
  <p><strong>Problem:</strong> However going to the URL does not load the site. <code>netstat -nlp | grep nginx</code> and <code>netstat -nlp | grep 80</code> both returns no results! <code>lsof -i :80</code> also returns nothing. A <code>dig</code> from another server returns the correct ip address so it shouldn't be a DNS problem. I was able to connect to apache which I have now stopped its service. nginx logs also show nothing.</p>
  
  <p>How should I troubleshoot this problem?</p>
  
  <p><strong>/etc/nginx/site-available/mysite.com</strong></p>
  
  <pre><code>server {
      listen   80;
      server_name www.mysite.com mysite.com *.mysite.com;
      access_log /var/log/nginx/access.log;
      error_log /var/log/nginx/error.log;
      root /var/www/mysite/public;
  
      index index.php index.html;
  
      location / {
          try_files $uri $uri/ /index.php?$args ;
      }
      location ~ \.php$ {
          fastcgi_pass unix:/var/run/php5-fpm.sock;
          fastcgi_index index.php;
          include fastcgi_params;
          fastcgi_read_timeout 300;
      }
  
  }
  </code></pre>