简体   繁体   中英

Using Sinatra on Ubuntu 11.10 (Server)

I have been learning Ruby (Rails/Sinatra) and it's good very good but OMFG how difficult is it to get running on a production server? Basically I want to have one of my domains running a RoR app. I have gone though countless tutorials on how to install ruby and get it running. I have managed to install Passenger (not sure how this even works) on apache2.

I have php installed maybe this is the problem. In order to get a sintra app working i have to do

ruby my_app_name.rb 

this then works on www.mydomain.com:4567 how do i just get it running on www.mydomain.com? I'm obviously not the best when it comes to server configuration im still learning, i'm use to making a php app -> uploading and running haha not so easy with ruby =[

Hope someone can help point me in the right direction, thanks!!

You can do a port redirect. No need for passenger or anything. Just run it on 4567 and remap it to 80 and you're fine. Of course only if you don't expect a lot of traffic. But if that's the case you should be good to go. Also turn off Apache and other servers you might be running.

This could be a starting point for you: https://help.ubuntu.com/community/IptablesHowTo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM