【发布时间】:2013-12-24 11:13:37
【问题描述】:
我正在用fuelphp 编写一个应用程序。在我当地的流浪者盒子上,一切都很完美。我已经从我的主服务器为开发框创建了一个子域,转发到数字海洋水滴的 IP,安装了 nginx、php5-fpm 以及使燃料工作所需的所有其他位,并且主页正常工作但是当我尝试导航到站点的任何其他区域我在 error.log 中收到此错误
2013/12/06 22:54:46 [error] 10177#0: *2 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: xxx.xxx.xxx.xxx, server: xxx.xxxxxxx.com, request: "GET /region HTTP/1.1", host: "xxx.xxxxxxx.com"
虚拟主机的 .conf 是:
server {
root /usr/share/nginx/html/fuel_app/public;
server_name xxx.xxxxxxx.com;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# root /usr/share/nginx/html/fuel_app/public;
# }
location @handler {
rewrite / /index.php;
}
location ~ .php/ {
rewrite ^(.*.php)/ $1 last;
}
location ~ .php$ {
if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
我在这里错过了什么?
【问题讨论】: