【发布时间】:2017-08-04 14:10:06
【问题描述】:
我按照此演练 (https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/apache/oss/el6/deploy_app.html) 使用Passenger 部署我的rails 应用程序,但是当我尝试访问浏览器上的IP 地址时,我收到“无法访问此站点”错误。我在使用 Nginx 时遇到了同样的问题,我切换到了 Apache,但我仍然遇到同样的问题。这是我的第一次部署,我现在真的很困惑。任何帮助将不胜感激。这是我的 /etc/httpd/conf.d/cfkmv.conf 如果有帮助的话
<VirtualHost *:80>
ServerName 144.217.160.59
# Tell Apache and Passenger where your app's 'public' directory is
DocumentRoot /var/www/my_fast_cash/code/public
PassengerRuby /usr/local/rvm/gems/ruby-2.3.1/wrappers/ruby
# Relax Apache security settings
<Directory /var/www/my_fast_cash/code/public>
Allow from all
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
</VirtualHost>
【问题讨论】:
-
从“文档根目录和目录”中删除 /code 并重新启动服务器可能对您有用。
标签: ruby-on-rails ruby apache deployment passenger