简体   繁体   English

在Ubuntu 11.10(服务器)上使用Sinatra

[英]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? 我一直在学习Ruby(Rails / Sinatra),它很好,但是OMFG在生产服务器上运行有多困难? Basically I want to have one of my domains running a RoR app. 基本上,我想让我的一个域运行RoR应用程序。 I have gone though countless tutorials on how to install ruby and get it running. 我已经阅读了无数有关如何安装ruby并使其运行的教程。 I have managed to install Passenger (not sure how this even works) on apache2. 我已经设法在apache2上安装了Passenger(不确定它的工作方式)。

I have php installed maybe this is the problem. 我已经安装了php,也许这就是问题所在。 In order to get a sintra app working i have to do 为了使sintra应用程序正常工作,我必须做

ruby my_app_name.rb 

this then works on www.mydomain.com:4567 how do i just get it running on www.mydomain.com? 然后可以在www.mydomain.com:4567上运行该如何在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 =[ 当我还在学习服务器配置时,我显然不是最好的,我习惯于制作一个php应用程序->使用ruby = [上传和运行haha并不是那么容易

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. 只需在4567上运行它,然后将其重新映射到80,就可以了。 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. 同时关闭Apache和您可能正在运行的其他服务器。

This could be a starting point for you: https://help.ubuntu.com/community/IptablesHowTo 这可能是您的起点: https : //help.ubuntu.com/community/IptablesHowTo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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