You are not logged in.

#1 2011-03-22 19:09:52

R3v4n
Member
Registered: 2010-09-06
Posts: 10

Passenger + Nginx

Hi,

I'm trying to install Passenger from AUR but I have several problems/questions :

1) Where is my passenger_root if I install the package ?
2) Is there any error in my nginx configuration file ? -> http://pastebin.com/MsCSNZha
3) Is there anything else I should do to deploy my Rails 3 application ?


Thank you,

Revan

Offline

#2 2011-03-22 23:21:27

lives2evil
Member
From: GMT+7
Registered: 2010-03-21
Posts: 244

Re: Passenger + Nginx

1) Running "pacman -Ql somepackagehere" should display all files in the packages.
2,3) Sorry, I don't know big_smile


tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ

Offline

#3 2011-03-23 08:40:06

R3v4n
Member
Registered: 2010-09-06
Posts: 10

Re: Passenger + Nginx

Thank you for your answer :-)

Here is the result of the pacman -Ql command :

pacman -Ql nginx-passenger
nginx-passenger /etc/
nginx-passenger /etc/conf.d/
nginx-passenger /etc/conf.d/nginx
nginx-passenger /etc/logrotate.d/
nginx-passenger /etc/logrotate.d/nginx
nginx-passenger /etc/nginx/
nginx-passenger /etc/nginx/conf/
nginx-passenger /etc/nginx/conf/fastcgi.conf
nginx-passenger /etc/nginx/conf/fastcgi.conf.default
nginx-passenger /etc/nginx/conf/fastcgi_params
nginx-passenger /etc/nginx/conf/fastcgi_params.default
nginx-passenger /etc/nginx/conf/koi-utf
nginx-passenger /etc/nginx/conf/koi-win
nginx-passenger /etc/nginx/conf/mime.types
nginx-passenger /etc/nginx/conf/mime.types.default
nginx-passenger /etc/nginx/conf/nginx.conf
nginx-passenger /etc/nginx/conf/nginx.conf.default
nginx-passenger /etc/nginx/conf/scgi_params
nginx-passenger /etc/nginx/conf/scgi_params.default
nginx-passenger /etc/nginx/conf/uwsgi_params
nginx-passenger /etc/nginx/conf/uwsgi_params.default
nginx-passenger /etc/nginx/conf/win-utf
nginx-passenger /etc/nginx/html
nginx-passenger /etc/nginx/logs
nginx-passenger /etc/rc.d/
nginx-passenger /etc/rc.d/nginx
nginx-passenger /srv/
nginx-passenger /srv/http/
nginx-passenger /srv/http/nginx/
nginx-passenger /srv/http/nginx/50x.html
nginx-passenger /usr/
nginx-passenger /usr/sbin/
nginx-passenger /usr/sbin/nginx
nginx-passenger /usr/share/
nginx-passenger /usr/share/licenses/
nginx-passenger /usr/share/licenses/nginx/
nginx-passenger /usr/share/licenses/nginx/LICENSE
nginx-passenger /var/
nginx-passenger /var/log/
nginx-passenger /var/log/nginx/
nginx-passenger /var/run/
nginx-passenger /var/spool/
nginx-passenger /var/spool/nginx/

But the result does not help me very much :-(

Offline

#4 2011-03-23 08:43:21

lives2evil
Member
From: GMT+7
Registered: 2010-03-21
Posts: 244

Re: Passenger + Nginx

I'm not very sure since I don't use this applications but try running "nginx" if that's what you want.
I can see it's the only executable file in the package.


tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ

Offline

#5 2011-03-23 16:20:03

awkwood
Member
From: .au <=> .ca
Registered: 2009-04-23
Posts: 91

Re: Passenger + Nginx

1)  Passenger is installed as a ruby gem.  So if you the most recent version installed (3.0.5) your passenger_root would be:

/usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.5

2+3)  You can read all of the Phusion Passenger documentation here.
There is documentation specific to the nginx module here.

Start nginx using

/etc/rc.d/nginx [start|stop|restart]

Nginx will check the config file before starting.

Offline

#6 2011-03-25 13:39:06

R3v4n
Member
Registered: 2010-09-06
Posts: 10

Re: Passenger + Nginx

Thank you very much for your answers :-)

1) Ok :-D I didn't know I was installed as a gem

2+3 ) Yes but I don't know with which precision nginx find errors. I mean, nginx would probably don't find semantic errors, but only syntax errors.

I have changed my configuration file and set the correct passenger_root, but It still doesn't work. Is there anything else I have to do ?

If I correctly understood the documention of passenger for nginx, the root of the application is the public directory of the application and then we can access using : http://myserver.net/myapp/public ?

Offline

#7 2011-04-02 15:57:45

R3v4n
Member
Registered: 2010-09-06
Posts: 10

Re: Passenger + Nginx

no idea ?

Offline

#8 2011-04-02 17:01:20

awkwood
Member
From: .au <=> .ca
Registered: 2009-04-23
Posts: 91

Re: Passenger + Nginx

Yes, you set the "root" to the public directory of your Rails app in nginx.conf.
Here's an example nginx.conf file for running a Rails app locally with Passenger.

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    passenger_root /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.5;
    passenger_ruby /usr/bin/ruby;
    server {
        listen       80;
        server_name  localhost;
        root /www/railsapp/public;
        passenger_enabled on;
    }
}

Restart nginx and this app should be available at  http://localhost or http://127.0.0.1.

You can check the status of Passenger by running:

sudo passenger-status

Nginx serves up static HTML pages from /srv/http/nginx (if Passenger isn't running using the config file above).
Nginx logs are in /var/log/nginx/

Passenger should display an error page if the problem is with your Rails app.
There's also a log directory in the root of your Rails app.

Offline

#9 2011-04-02 22:36:49

R3v4n
Member
Registered: 2010-09-06
Posts: 10

Re: Passenger + Nginx

Thank you very much for your help :-D

Everything works correctly ;-)

Offline

Board footer

Powered by FluxBB