我有一个运行在Middleman Server上的ruby on rails应用程序。我在Windows azure ubuntu虚拟机中安装了该应用程序。完成安装后,我通过给此命令“ middleman server”启动服务器,我的应用程序运行良好。之后,我按照以下步骤为该应用程序安装了apache Web服务器
http://nathanhoad.net/how-to-ruby-on-rails-ubuntu-apache-with-passenger
但是我在完成上述过程后收到此错误
“有效!这是该服务器的默认网页。该网络服务器软件正在运行,但尚未添加任何内容。”
请帮助我如何为通常在中间人服务器上运行的Rails应用程序上的ruby安装Web服务器。
您说您已经安装了Apache,这里有您的Web服务器。而且,如果您安装了Passenger,那么您将为Rails或Middleman提供一个应用程序服务器。请查看Apache版本的Phusion Passenger用户指南。我按照那个来设置。您src
是要在工作时还是build
跑步后查看middleman build
?您正在构建Rails或Middleman应用程序/网站?
我一直在研究用于Middleman Development设置的不同方法。我结束了尝试一些不同的配置并将其记录在Gist中。向下滚动,了解我的乘客版本的一些信息,我对MM非常陌生,那是我第一次尝试使用乘客,所以请考虑到这一点。我认为最棘手的部分是“乘客”需要一个public
文件夹,但“中间人”根本不使用public
文件夹。我认为与中间人同行的乘客比其他方法有更多的“陷阱”。在我的Gist中查看3.0。
我的vhosts文件如下所示:
# Testing Middleman Development Approaches #3 with Passenger,
# note the public folder is used to serve the src directory
<VirtualHost *:80>
ServerName mm_passenger.loc
DocumentRoot /Users/davekaplan/mm_passenger/public
ServerAlias mm_passenger.loc.*.xip.io
<Directory /Users/davekaplan/mm_passenger/public>
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName mm_passenger.build
DocumentRoot /Users/davekaplan/mm_passenger/build
<Directory /Users/davekaplan/mm_passenger/build>
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
我在Mac上运行Apache和Passenger。我对Apache/etc/apache/extra/httpd-vhosts.conf
文件做了一个虚拟主机(站点文件的路径),对我的/etc/hosts
文件做了一个域。
不要放弃!
戴夫
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句