title: How to use multiple parse apps using PM2 and Nginx
body: <p>I'm wondering on how I can migrate different apps to the same server, I'm using PM2 to ensure it's always running.</p>
  
  <p>Here is my ecosystem file</p>
  
  <pre><code>{
    "apps" : [{
      "name"        : "parse-wrapper",
      "script"      : "/usr/bin/parse-server",
      "watch"       : true,
      "merge_logs"  : true,
      "cwd"         : "/home/parse",
      "env": {
        "PARSE_SERVER_CLOUD_CODE_MAIN": "/home/parse/cloud/main.js",
        "PARSE_SERVER_DATABASE_URI": "mongodb://parse:password@your_domain_name:27017/database_name?ssl=true",
        "PARSE_SERVER_APPLICATION_ID": "your_application_id",
        "PARSE_SERVER_MASTER_KEY": "your_master_key",
      }
    }]
  }
  </code></pre>
  
  <p>Shoud I use the same ecosystem file or should I create a new one and run ??</p>
  
  <blockquote>
    <p>PM2 start</p>
  </blockquote>
  
  <p>How to configure the URL to different apps in Nginx</p>
  
  <pre><code>location /app1/ {
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-NginX-Proxy true;
              proxy_pass http://localhost:1337/parse/;
              proxy_ssl_session_reuse off;
              proxy_set_header Host $http_host;
              proxy_redirect off;
      }
  </code></pre>