我在 ubuntu 14.04 上安装了带有 Passenger 的 nginx,但 nginx 抛出了
403 禁止错误
我检查了权限,一切正常。我检查了 nginx 配置,似乎没有问题
user root;
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
passenger_root /home/ubuntu/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.24;
passenger_ruby /home/ubuntu/.rbenv/shims/ruby;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80 default_server;
server_name ;
root /home/ubuntu/site/current/public;
passenger_enabled on;
rails_env production;
index index.html;
access_log logs/access.log;
location ~ ^/(assets)/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
}
但 nginx 日志一直显示:
2016/02/18 03:28:57 [info] 13605#0:在 /etc/nginx/nginx.conf:42 中为推送模块使用 32768KiB 共享内存 2016/02/18 03:31:11 [info] 13642#0:在 /etc/nginx/nginx.conf:42 中为推送模块使用 32768KiB 共享内存
有人遇到了同样的问题吗?