I am really new to server configuration. I have a rails application locally and I have access to an amazon EC2 server instance. I am required to use nginx for web server and puma for application server. Can someone kindly explain to me in detail (file creation, directory, command etc) how I can make that application up and running for public access via the domain?
My rails app directories are:
$~ server/user/home/apps/myapp/shared/...
$~ server/user/home/apps/myapp/current/...
I have tried capistrano. But no matter which ever tutorial I follow, I always end up having .../shared/tmp/sockets/puma.myapp.sock failed (2: No such file or directory) while connecting to upstream... error.
here are the steps that worked for me:
Install Nginx
sudo apt install nginxsudo ufw app listsudo ufw allow 'Nginx HTTP'Setup Server
sudo nano /etc/nginx/sites-available/appname.appnamewith the name of your app:sudo ln -s /etc/nginx/sites-available/repuestosgonnet /etc/nginx/sites-enabled/sudo nano /etc/nginx/nginx.confserver_names_hash_bucket_size 64;server_tokens off;sudo nginx -tsudo systemctl restart nginxI hope that works for you!
Let me know if you have any questions.