【发布时间】:2015-10-12 00:43:10
【问题描述】:
我的 Nginx 配置如下:
server {
listen 80;
server_name myserver.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log error;
index index.php;
set $root_path '/var/www/webroot/ROOT/public';
root $root_path;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
root $root_path;
}
location ~ /\.ht {
deny all;
}
}
并在ROOT 文件夹中安装了 Phalcon。但是,Phalcon 一直显示 403 页面。我在日志中找不到任何错误;我唯一拥有的是当我运行service nginx reload 时会抛出[emerg] open() "/var/run/nginx.pid" failed (13: Permission denied)。但是,当我运行 sudo service nginx reload 时,它执行时没有任何错误。
你们有什么线索吗?
【问题讨论】: