I have one rails application needed to be deployed by passenger module nginx. This application needs to be served for hundred domain names. I don't have enough memory to launch hundred rails instances. I'm not sure the proper way to launch rails in few instances. It's the same application under different domain names.
server {
listen 80;
server_name www.a_domain.com;
root /webapps/mycook/public;
passenger_enabled on;
}
server {
listen 80;
server_name www.b_domain.com;
root /webapps/mycook/public;
passenger_enabled on;
}
server {
listen 80;
server_name www.c_domain.com;
root /webapps/mycook/public;
passenger_enabled on;
}
As you can the above code, it would launch three rails instances. It would be nice to launch only instance to serve under these 3 domain. Anyone has some suggestions?