我正在尝试在Ubuntu 16.04 vps中运行我的rails应用程序,但我得到了#34;我们很抱歉,但出了点问题(500)
>在/var/log/nginx/error.log中我得到了这个[ N 2017-09-10 05:06:14.6776 2071/T5 age/Cor/CoreMain.cpp:588 ]:
Signal received. Gracefully shutting down... (send signal 2 more
time(s) to force shutdown)
[ N 2017-09-10 05:06:14.6777 2071/T1 age/Cor/CoreMain.cpp:1002 ]:
Received command to shutdown gracefully. Waiting until all clients
have disconnected...
[ N 2017-09-10 05:06:14.6779 2071/Ta Ser/Server.h:886 ]: [ApiServer]
Freed 0 spare client objects
[ N 2017-09-10 05:06:14.6779 2071/Ta Ser/Server.h:531 ]: [ApiServer]
Shutdown finished
[ N 2017-09-10 05:06:14.6783 2071/T5 Ser/Server.h:886 ]: [ServerThr.1]
Freed 128 spare client objects
[ N 2017-09-10 05:06:14.6783 2071/T5 Ser/Server.h:531 ]: [ServerThr.1]
Shutdown finished
[ N 2017-09-10 05:06:14.6800 2077/T3 age/Ust/UstRouterMain.cpp:430 ]:
Signal received. Gracefully shutting down... (send signal 2 more
time(s) to force shutdown)
[ N 2017-09-10 05:06:14.6801 2077/T1 age/Ust/UstRouterMain.cpp:500 ]:
Received command to shutdown gracefully. Waiting until all clients
have disconnected...
[ N 2017-09-10 05:06:14.6802 2077/T5 Ser/Server.h:886 ]:
[UstRouterApiServer] Freed 0 spare client objects
[ N 2017-09-10 05:06:14.6802 2077/T5 Ser/Server.h:531 ]:
[UstRouterApiServer] Shutdown finished
[ N 2017-09-10 05:06:14.6805 2077/T3 Ser/Server.h:531 ]: [UstRouter]
Shutdown finished
[ N 2017-09-10 05:06:14.6806 2077/T1 age/Ust/UstRouterMain.cpp:531 ]:
Passenger UstRouter shutdown finished
[ N 2017-09-10 05:06:14.7004 2071/T1 age/Cor/CoreMain.cpp:1068 ]:
Passenger core shutdown finished
2017/09/10 05:06:15 [info] 2131#2131: Using 32768KiB of shared memory
for nchan in /etc/nginx/nginx.conf:71
[ N 2017-09-10 05:06:15.7729 2137/T1 age/Wat/WatchdogMain.cpp:1283 ]:
Starting Passenger watchdog...
[ N 2017-09-10 05:06:15.7853 2140/T1 age/Cor/CoreMain.cpp:1083 ]:
Starting Passenger core...
[ N 2017-09-10 05:06:15.7855 2140/T1 age/Cor/CoreMain.cpp:248 ]:
Passenger core running in multi-application mode.
[ N 2017-09-10 05:06:15.7901 2140/T1 age/Cor/CoreMain.cpp:830 ]:
Passenger core online, PID 2140
[ N 2017-09-10 05:06:15.8015 2146/T1 age/Ust/UstRouterMain.cpp:537 ]:
Starting Passenger UstRouter...
[ N 2017-09-10 05:06:15.8025 2146/T1 age/Ust/UstRouterMain.cpp:350 ]:
Passenger UstRouter online, PID 2146
[ N 2017-09-10 05:06:18.2497 2140/T8
age/Cor/SecurityUpdateChecker.h:374 ]: Security update check: no
update found (next check in 24 hours)
App 2165 stdout:
App 2165 stderr: sh: 1:
App 2165 stderr: env: not found
App 2165 stderr:
App 2179 stdout:
我已经追了好几个小时,非常感谢任何方向,如果我需要发布更多信息,请告诉我。
编辑: 这是我的nginx.conf文件和我的虚拟主机文件。我正在尝试连接我的服务器ip
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json
application/javascript text/xml application/xml application/xml+rss
text/javascript;
##
# Phusion Passenger config
##
# Uncomment it if you installed passenger or passenger-enterprise
##
include /etc/nginx/passenger.conf;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
和
server{
listen 80;
server_name ip;
root /var/www/chads_photos/public;
passenger_enabled on;
passenger_ruby /home/webmaster/.rbenv/versions/2.4.0/bin/ruby;
passenger_env_var SECRET_KEY_BASE secret;
passenger_env_var CHAD_DB_USERNAME user;
passenger_env_var CHAD_DB_PASSWROD pass;
}