I was able to successfully configure nginx and passenger phusion. I now have the following configuration
server {listen 80 server_name **sub1.example.com** root /home/user/app1/public }
server {listen 80 server_name **sub2.example.com** root /home/user/app2/public }
Now, I want to change it to the following configuration
server {listen 80 server_name **dev.example.com/example1** root /home/user/app1/public }
server {listen 80 server_name **dev.example.com/example2** root /home/user/app1/public }
I tried using the location directive, but wasn't successful. I'm not even sure if this is possible. Any help would be greatly appreciated. Thanks.
The following are my nginx.conf settings
server {
listen 80;
server_name dev.example.com;
location = /app1/ {
root /home/rails/app1/public/;
passenger_enabled on;
rails_env development;
}
location /app2/ {
root /home/rails/app2/public/;
passenger_enabled on;
rails_env development;
}
}