title: Running Apache2 Server along with Node Server [NGINX]
body: <p>I have a server with several node.Js app installed. I follow this guide to set up my reverse proxy setting: <a href="https://www.digitalocean.com/community/tutorials/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab" rel="nofollow">https://www.digitalocean.com/community/tutorials/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab</a></p>
  
  <p>So my <code>/etc/nginx/conf.d</code> folder is crowded with Nginx configuration files, like:</p>
  
  <pre><code>server {
    listen 80;
  
    server_name my-domain.com;
  
    location / {
      proxy_pass http://localhost:3001;  // my node app runs on port 3001
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection 'upgrade';
      proxy_set_header Host $host;
      proxy_cache_bypass $http_upgrade;
    }
  }
  </code></pre>
  
  <p>Then, I installed and managed to run my <code>apache2</code> server on port 3002. I tried to use this configuration:</p>
  
  <pre><code>server {
    listen 80;
  
    server_name my-wordpress-blog.com;
  
    location / {
      proxy_pass http://localhost:3002/wordpress-folder-name; // yes, this is for wordpress 
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection 'upgrade';
      proxy_set_header Host $host;
      proxy_cache_bypass $http_upgrade;
    }
  }
  </code></pre>
  
  <p>The problem is: whenever I try to access <code>my-wordpress-blog.com</code>, it reroutes me to <code>my-wordpress-blog.com/html</code> with 404 error: <code>The requested URL /htmlhtml/ was not found on this server..</code> So how to set this up correctly ? Thx </p>