title: Nginx passenger integration mode always require Passengerfile.json file?
body: <p>I've followed this installation guide to setup nginx and passenger integration mode:</p>
  
  <p><a href="https://www.phusionpassenger.com/library/install/nginx/install/oss/el7/" rel="nofollow noreferrer">https://www.phusionpassenger.com/library/install/nginx/install/oss/el7/</a></p>
  
  <p>I'm aware that "Passenger in its Nginx integration mode is to be configured via the Nginx configuration file. There is no configuration file that is specific to Passenger only" => No Passengerfile.json in root application directory.</p>
  
  <p>But after configured passenger.conf and virtual host config and started nginx, the errors occurred:</p>
  
  <blockquote>
    <p>2019/05/29 09:13:22 [alert] 16126#0: *3 Error opening '/home/deploy/my-app/current/Passengerfile.json' for reading: Permission denied (errno=13); This error means that the Nginx worker process (PID 16126, running as UID 997) does not have permission to access this file</p>
  </blockquote>
  
  <p>I've tried to give permissions to nginx worker process following this instruction: <a href="https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/ruby/#upon-accessing-the-web-app-nginx-reports-a-permission-denied-error" rel="nofollow noreferrer">https://www.phusionpassenger.com/library/admin/nginx/troubleshooting/ruby/#upon-accessing-the-web-app-nginx-reports-a-permission-denied-error</a></p>
  
  <p>But can't solve the problem.</p>
  
  <p>My passenger.conf inside /etc/nginx/conf.d</p>
  
  <pre class="lang-rb prettyprint-override"><code>passenger.conf
  # To enable the Phusion Passenger application server (www.phusionpassenger.com),
  # install the following package:
  #
  #   yum install passenger
  #
  # Then uncomment these options:
  
  passenger_root /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini;
  passenger_ruby /home/deploy/.rbenv/shims/ruby;
  passenger_instance_registry_dir /var/run/passenger-instreg;
  </code></pre>
  
  <p>My app configuration file:</p>
  
  <pre><code>server {
    listen 80;
    listen [::]:80;
  
    server_name myapp.com;
    root /home/deploy/my-app/current/public;
  
    passenger_enabled on;
    passenger_ruby /home/deploy/.rbenv/shims/ruby;
    rails_env production;
  
    location /cable {
      passenger_app_group_name myapp_websocket;
      passenger_force_max_concurrent_requests_per_process 0;
    }
  
    # Allow uploads up to 100MB in size
    client_max_body_size 100m;
  
    location ~ ^/(assets|packs|uploads) {
      expires max;
      gzip_static on;
    }
  }
  </code></pre>
  
  <p>passenger-memory-stats</p>
  
  <pre><code>---------- Nginx processes -----------
  PID    PPID   VMSize    Private  Name
  --------------------------------------
  16121  1      113.5 MB  0.6 MB   nginx: master process /usr/sbin/nginx
  16125  16121  113.7 MB  0.8 MB   nginx: worker process
  16126  16121  113.7 MB  0.8 MB   nginx: worker process
  ### Processes: 3
  ### Total private dirty RSS: 2.13 MB
  </code></pre>
  
  <pre><code>----- Passenger processes -----
  PID    VMSize    Private  Name
  -------------------------------
  16109  355.0 MB  2.1 MB   Passenger watchdog
  16112  923.4 MB  4.0 MB   Passenger core
  ### Processes: 2
  ### Total private dirty RSS: 6.11 MB
  </code></pre>
  
  <p>passenger-config restart-app /home/deploy/my-app</p>
  
  <pre><code>There are no Phusion Passenger-served applications running whose paths begin with '/home/deploy/my-app'.
  </code></pre>
  
  <p>Thanks in advance!</p>