已部署 Rails 个应用程序仍然看到 nginx 初始页面
Deployed Rails app still seeing nginx splash page
我刚刚设置了我的第一个 Digital Ocean VPS 并按照以下指南成功部署了我的 Rails 应用程序:https://gorails.com/deploy/ubuntu/14.04
不幸的是,我仍然看到 nginx 启动页面,希望你们能帮我解决这个问题?
在 nginx 错误日志中我看到了这个:
[ 2016-04-20 14:48:15.4541 31875/7f70762f57c0 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 31875
2016/04/21 14:58:58 [emerg] 1721#0: "listen" directive is not allowed here in /etc/nginx/sites-enabled/default.save:27
我的 nginx conf 看起来像:
server {
listen 80 default_server;
server_name dev.myapp.co.uk;
passenger_enabled on;
rails_env production;
root /home/deploy/myapp/current/public;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
我显然已将 "myapp" 更改为正确的域名和应用程序名称。
有什么想法吗?
问题似乎是您在 /etc/nginx/sites-enabled/
中有两个 nginx 配置文件,并且它们都具有相同的 listen 80 default_server;
行。
我刚刚设置了我的第一个 Digital Ocean VPS 并按照以下指南成功部署了我的 Rails 应用程序:https://gorails.com/deploy/ubuntu/14.04
不幸的是,我仍然看到 nginx 启动页面,希望你们能帮我解决这个问题?
在 nginx 错误日志中我看到了这个:
[ 2016-04-20 14:48:15.4541 31875/7f70762f57c0 age/Ust/UstRouterMain.cpp:342 ]: Passenger UstRouter online, PID 31875 2016/04/21 14:58:58 [emerg] 1721#0: "listen" directive is not allowed here in /etc/nginx/sites-enabled/default.save:27
我的 nginx conf 看起来像:
server {
listen 80 default_server;
server_name dev.myapp.co.uk;
passenger_enabled on;
rails_env production;
root /home/deploy/myapp/current/public;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
我显然已将 "myapp" 更改为正确的域名和应用程序名称。
有什么想法吗?
问题似乎是您在 /etc/nginx/sites-enabled/
中有两个 nginx 配置文件,并且它们都具有相同的 listen 80 default_server;
行。