title: NGINX and Apache port 80 conflict
body: <p>I am running a DigitalOcean droplet that is running a wordpress instillation on apache. I am trying to get a NGINX and Django system up and running but it's not allowing me to use port 80 as it's already in use. </p>
  
  <p>Heres my command that runs Django: </p>
  
  <pre><code>gunicorn --env DJANGO_SETTINGS_MODULE=projectName.settings --settings projectName.settings -b domainName.co.uk projectName.wsgi
  </code></pre>
  
  <p>Heres my file contents at: <code>/etc/nginx/sites-available/projectName</code> </p>
  
  <pre><code>server {
          server_name domainName.co.uk
  
          access_log off;
  
          location /static/ {
                  alias /opt/projectName/static/;
          }
  
          location / {
                  proxy_pass http://127.0.0.1:8001;
                  proxy_set_header X-Forwarded-Host $server_name;
                  proxy_set_header X-Real-IP $remote_addr;
                  add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"';
          }
  }
  </code></pre>
  
  <p>When I visit the domain name, it's just showing me the website for the default droplet (the WP instillation). I'm guessing the proxy_pass is where the data should be going but it's not. </p>
  
  <p>Can anyone point me in the right direction please. Thankyou</p>
  
  <p><em>Edit</em></p>
  
  <p>I have ended up going down the Apache route and i've now got this in my <code>/etc/apache2/sites-enabled/000-default.conf</code> file. Should the IP be 127.0.0.1? </p>
  
  <pre><code>&lt;VirtualHost *:*&gt;
      ProxyPreserveHost On
  
      ProxyPass / http://127.0.0.1:8001/
      ProxyPassReverse / http://127.0.0.1:8001/
  
      ServerName domainName.co.uk
  &lt;/VirtualHost&gt;
  </code></pre>