By Apop
Are there any good link/resources deploying a Rack app(Not rails!).
So far I have the Rack app set-up with the folders and such but I have been having LOTS of trouble with the nginx part so I uninstalled and decided to try again.
Maybe someone here give me a good dumbed-down version to do this task?
Thanks in advance
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sure thing! Here is the simplified setup for nginx as a proxy to your ruby app.
Install nginx:
apt-get update;
apt-get install nginx
Then in your main virtualhost configuration: /etc/nginx/sites-enabled/default
Replace the existing Location / block with the following:
location / {
proxy_pass http://localhost:4567;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
Making sure to change 4567 to the port your app is running on if it is different. Then restart nginx so your changes will take effect:
service nginx restart;
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.