I am currently running a simple Meteor.js application on a server using Phusion Passenger + Nginx.
What I would like to do is to configure it so that I have one main app on www.example.com
and additional apps on www.example.com/app1
, www.example.com/app2
and so on. How can I achieve this configuration using the above-mentioned tools? I know how to do this using only nginx, but it seems like additional configuration for Passenger is required.
My current nginx configuration is as follows:
server {
listen 80;
server_name example.com;
# Tell Nginx and Passenger where your app's 'public' directory is
root /var/www/app1/bundle/public;
passenger_friendly_error_pages on;
# Turn on Passenger
passenger_enabled on;
# Tell Passenger that your app is a Meteor app
passenger_app_type node;
passenger_startup_file main.js;
# Tell your app where MongoDB is
passenger_env_var MONGO_URL mongodb://127.0.0.1:27017/app1;
# Tell your app what its root URL is
passenger_env_var ROOT_URL http://www.example.com/app1;
}
This serves the application on www.example.com/
, but I would like to move it to www.example.com/app1/
.