当我开始并配置测试nginx时。我的下面有一个未知错误
sudo service nginx configtest
nginx: the configuration file /opt/nginx/conf/nginx.conf syntax is ok
nginx: [alert] Unable to start the Phusion Passenger watchdog because it encountered the following error during startup: Unable to start the Phusion Passenger helper agent: it seems to have crashed during startup for an unknown reason, with exit code 1 (-1: Unknown error)
我的配置文件看起来像
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /home/sarath/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.53;
passenger_ruby /home/sarath/.rvm/gems/ruby-2.1.0/wrappers/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
gzip on;
gzip_vary on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
server {
listen 81;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
server {
listen 8989;
server_name XXXXXXXXXX;
root /home/sarath/ruby_project/rub/public;
client_max_body_size 128M;
passenger_enabled on;
rails_env production;
location ~ ^/(assets|fonts|images|javascripts|stylesheets|system)/ {
expires max;
add_header Cache-Control public;
}
}
}
我在浏览器中的输出是:
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
我的应用程序是使用生产environemnt测试好的导轨上的红宝石