gem "puma"
change to project directory
bundle install
puma -e [environment] -p [port-number] -d
puma -e production -p 9292 -d
This will start the rails app in production environment on port 9292 and daemonize the process
sudo a2enmod proxy
sudo a2enmod proxy_http
Example /etc/apache2/sites-available/[app_name] .conf file
<virtualHost *:80>
ServerName www.site-1.com
ServerAlias site-1.com
DocumentRoot /var/www/site-1/public
#<location /assets>
# ProxyPass !
#</location>
<location /system>
ProxyPass !
</location>
ProxyPass / http://127.0.0.1:9292/
ProxyPassReverse / http://127.0.0.1:9292/ # don't forget the trailing slashes at end!!!
</virtualHost>
sudo a2ensite site-1
apachectl -t
sudo /etc/init.d/apache2 restart
// There are better ways to do this, but this is quick and dirty and works for temporary environments
Find Process ID
ps aux | grep puma
lsof -wni tcp:[port_number]
the process you're looking for should be running on the port of your app
Stop Process
sudo kill -9 [process ID]
Start Process
puma -e [environment] -p [port-number] -d
https://www.learnwithdaniel.com/2015/01/apache-puma-via-reverse-proxy/