我已经使用Capistrano设置和部署了一个应用程序,并设置了服务器和ngnix配置文件,但是,我仍然看到Welcome to ngnix欢迎屏幕。
下面是我在/etc/nginx/sites-enabled/default文件中的内容
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name IP;
passenger_enabled on;
rails_env production;
root /home/poladmin/poetry-out-loud-v2/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;
}
}但正如我所说,当我访问服务器IP时,我看到的全部内容是

发布于 2018-07-01 22:00:16
由于您编辑了/etc/nginx/sites-enabled/default文件,请尝试使用nginx -s reload命令重新加载nginx (如果您使用的是Linux或类似的命令,取决于您的操作系统和nginx版本)。
发布于 2018-07-02 22:33:49
由于您已经编辑了nginx配置文件,因此您可以尝试通过执行sudo /etc/init.d/nginx restart来重新启动nginx,以使配置文件生效。另外,不要忘记启动真正的ruby服务器,并确保它正在监听您通过nginx配置的相同端口(有时ruby应用程序可能在不同的端口上运行)。
https://stackoverflow.com/questions/51111048
复制相似问题