Skip to content

Instantly share code, notes, and snippets.

@gieart87
Created February 21, 2016 03:38
Show Gist options
  • Save gieart87/c563bc630e558cd62967 to your computer and use it in GitHub Desktop.
Save gieart87/c563bc630e558cd62967 to your computer and use it in GitHub Desktop.
Deploy Rails App in Sub Directory with Nginx + Ubuntu 14.04
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com;
location / {
passenger_enabled on;
rails_env development;
root /var/www/rails/my_app/public;
}
location /second-app {
root /var/www/rails/my_app;
passenger_base_uri /second-app;
passenger_enabled on;
rails_env development;
}
location /third-app {
root /var/www/rails/my_app;
passenger_base_uri /third-app;
passenger_enabled on;
rails_env development;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment