title: *Actually* getting nginx to reload config
body: <p>I'm trying to set up a subdomain with nginx on Ubuntu 13.04.  I was actually able to do this before with:</p>
  
  <pre><code>server {
      root /home/ajcrites/projects/site-a/public/;
      server_name sub.localhost;
  
      location / {
          try_files $uri /index.php;
      }
  
      location ~ \.php$ {
          try_files $uri =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          #fastcgi_pass 127.0.0.1:9000;
          fastcgi_pass unix:/var/run/php5-fpm.sock;
          fastcgi_index index.php;
          include fastcgi_params;
      }
  }
  </code></pre>
  
  <p>Then <code>http://sub.localhost</code> would work perfectly.</p>
  
  <p>Now, I've copied the same config and just changed <code>root</code> (to a path that exists) and <code>server_name</code> to some other value like <code>subber.localhost</code>.  No matter what I do, I can't get <code>subber.localhost</code> to work.  Also no matter what I do, I can't get <code>sub.localhost</code> to <em>not</em> work while nginx is running.  What's weird is that nginx actually will complain about errors in the config files, but even if there are none it doesn't matter.  <em>Only</em> <code>sub.localhost</code> will work.</p>
  
  <p>I've tried doing all of the following, repeatedly and with various combinations:</p>
  
  <ul>
  <li>Create a separate file in <code>sites-available</code>.  nginx seems to thing that it's there since it will complain about errors when I try to reload.</li>
  <li><code>service nginx stop &amp;&amp; service nginx start</code></li>
  <li><code>nginx stop; nginx</code></li>
  <li><code>nginx -s reload</code></li>
  </ul>
  
  <p>When I <code>stop</code> it, <code>pgrep</code> does not show any <code>nginx</code> process, so it seems like it is correctly getting stopped.  This does not appear to be a cache issue as a fresh browser instance reacts the same way.</p>