configuration error passenger + nginx

98 views
Skip to first unread message

matt baker

unread,
Mar 1, 2016, 3:35:19 AM3/1/16
to Phusion Passenger Discussions

Hi,



I am getting this 404 error with log statements as "/etc/nginx/sites-enabled/public/muser/index.html"

whereas my actual location is root "/mnt/f/projects/usermanagement/;"
I configured the same in sites-enabled and available and also in nginx.conf files where should i give my root application path  !

Please suggest

my sites-enabled config is
server {
listen 80;
server_name yourserver.com;

# Tell Nginx and Passenger where your app's 'public' directory is
root /mnt/f/projects/usermanagement;

# Turn on Passenger
passenger_enabled on;
# Tell Passenger that your app is a Node.js app
passenger_app_type node;
passenger_startup_file app.js;

}

matt baker

unread,
Mar 1, 2016, 4:55:49 AM3/1/16
to Phusion Passenger Discussions

my folder structure is

Daniel Knoppel

unread,
Mar 1, 2016, 6:21:38 AM3/1/16
to Phusion Passenger Discussions
What is sites-enabled? It sounds like the config dir for Apache, not for Nginx.

The most likely cause is that the configuration file you edited is not the one that is being used, which is easy to check by putting some random characters in it. If it is really using that file then Nginx/Passenger should not start at all.

Please make sure exactly which server you are trying to use and that you don't have multiple installations that will conflict.

- Daniel


On Tuesday, March 1, 2016 at 10:55:49 AM UTC+1, matt baker wrote:

my folder structure is

matt baker

unread,
Mar 1, 2016, 8:39:14 AM3/1/16
to Phusion Passenger Discussions
Hi,

Thanks for prompt response
sites-enabled is under nginx directories
"etc/nginx/sites-enabled"


I actually I did the and now it working means the 404 error is resolved by putting below configuration setting
etc/nginx/sites-enabled/default

 server_name example;
 root /mnt/F/rizwan/projects/usermanagement/public;
 passenger_enabled on;

passenger_app_type node;
passenger_startup_file app.js;


the above work meaning i am not getting 404 but Iam now getting below error

[ 2016-03-01 18:24:59.2833 3028/7f0d543fb700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /mnt/F/rizwan/projects/usermanagement: An error occurred while starting the web application: it did not write a startup response in time.
Auto Generated Inline Image 1

Daniel Knoppel

unread,
Mar 1, 2016, 10:07:29 AM3/1/16
to Phusion Passenger Discussions
OK so before you had the wrong root path.

The error message tells you to read: https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems
Did you check your app for the problems mentioned there, like stdout redirection?

- Daniel

matt baker

unread,
Mar 2, 2016, 2:19:29 AM3/2/16
to Phusion Passenger Discussions
Hi,

a.after configuration should is it necessary to run "sudo passenger start" or simply
"sudo service nginx restart" will work ?
b. when I am  running "sudo passenger start" I am getting below error even after correct path









      Am i missing some configuration piece
      why is passenger goes to execute /etc/nginx/sites-enabled/public/index.html rather than provided path "/mnt/F/rizwan/projects/usermanagement/public";


       
  root /mnt/F/rizwan/projects/usermanagement/public;

        #root /usr/share/nginx/html;

        # Add index.php to the list if you are using PHP
        #index index.html index.htm index.nginx-debian.html;

        #server_name example;
#listen 80;
# passenger_enabled on;

        server_name example;
#        root /mnt/F/rizwan/projects/usermanagement/public;
Auto Generated Inline Image 1

Hongli Lai

unread,
Mar 2, 2016, 8:56:09 AM3/2/16
to phusion-passenger
On Wed, Mar 2, 2016 at 8:19 AM, matt baker <captain...@gmail.com> wrote:
Hi,

a.after configuration should is it necessary to run "sudo passenger start" or simply
"sudo service nginx restart" will work ?

No, it is neither necessary nor correct to do that. 'passenger start' activates a completely different mode of Passenger, that has got nothing to do with Passenger for Nginx. See https://www.phusionpassenger.com/library/indepth/integration_modes.html

matt baker

unread,
Mar 2, 2016, 9:02:38 AM3/2/16
to Phusion Passenger Discussions, hon...@phusion.nl
Acknowledged Hongli Lai , the base of my configuration problem is now resolved thanks for clearing things out ! @ Daniel Knoppel and 

matt baker

unread,
Mar 3, 2016, 1:38:07 AM3/3/16
to Phusion Passenger Discussions, hon...@phusion.nl
How do i mark this thread as closed ?
Reply all
Reply to author
Forward
0 new messages