NGINX - Two different rails apps under same domain
- by Murkin
I have two different Rails (passenger) apps that I wan to host on one server:
somehost.com/ <-- App #1
somehost.com/admin <--- App #2
Tried playing with the 'location' directive, but failed to have both operate.
Can someone suggest the correct approach ?
(I would prefer both to share same environment, only launch from different directories)
EDIT: Sample (desired) config
Trying to do something like:
server {
listen 80;
server_name myhost.com;
rails_env production;
passenger_enabled on;
location / {
root /opt/main_site/public/;
}
location /dev {
root /opt/admin_site/public/;
}
}