NGINX Setup (Rails App in a subdirectory)

I’m using NGINX with Passenger to run a rails application on an Ubuntu server.

However, I’d like to have the rails app served from www.mydomain.com/store , and have
a wordpress install served from www.mydomain.com.

Read More

How would one go about setting up the nginx.conf?

Related posts

Leave a Reply

1 comment

  1. From the official manual:

    To do this, make a symlink from your Ruby on Rails application’s public folder to a directory in the document root. For example:

    ln -s /webapps/mycook/public /websites/phusion/rails

    Next, set passenger_enabled on and add a passenger_base_uri option to the server block:

    server {
        listen 80;
        server_name www.phusion.nl;
        root /websites/phusion;
        passenger_enabled on;        # <--- These lines have
        passenger_base_uri /rails;   # <--- been added.
    }