Jelastic supports the following Ruby application servers:
Apache2 + Passenger
The default dynamic mod_passenger.so module was added to the Apache build. It is included in the modules folder while Ruby environment creation and is enabled by default.
- NGINX + Passenger
- NGINX + Puma
- NGINX + Unicorn
NGINX server was recompiled with Passenger, Puma and Unicorn in-built modules. Each of them represents a separate server for Ruby scripts processing. You can choose one you need due to your application’s size, number of visitors, required rapidness, etc.
Taking into consideration that NGINX has several supported modules let’s see how to enable the one you need.
NGINX Modules Setting
Passenger module is the default one for all new Ruby environments with NGINX application server. In order to enable another module, follow the next steps:
1. Click Config button next to the application server of your NGINX-Ruby environment.
2. In the opened Configuration Manager panel navigate to the conf > nginx.conf file.
3. Find the include app_servers strings:# include app_servers/nginx-unicorn.conf;
# include app_servers/nginx-puma.conf;
4. Uncomment the string for the required module and comment the previously active one.
|Don’t forget to comment previously used module, otherwise you’ll get the compatibility errors. Only one string should be uncommented.|
5. Save the changes made and Restart the NGINX application server in order to apply them.
6. Deploy your Ruby application if you haven’t done this before.
Note: added SSH key is attached to your account, but not just to a separate environment
8. While inside the container you should navigate to the ROOT folder:
9. Then run one of the following commands depending on the module you would like to enable:
pumactl -F config/puma.rb start
unicorn_rails -c config/unicorn.rb -D
That’s all! Now you can work with the chosen Ruby NGINX module.
and repeat 1-5 steps of this instruction uncommenting Passenger line in config file.