无法获取在Nginx上工作的Codeigniter URL

在我的窗口成功设置nginx后,另一个问题,我卡住了。 尽pipe如此,一切正常。 我能够访问页面和PHP工作正常,但是当我尝试使用Codeignitertypes的URL,我的意思是,

https://localhost/index.php/<controller> 

即使我在“index.php”之后插入一个斜线,也No input file specified ,我认为这意味着FastCGI服务器无法捕获正确的文件。 这是我的configuration文件,

 server { server_name localhost; listen 443; root /wamp/www/; ssl on; ssl_certificate /wamp/www/server.crt; ssl_certificate_key /wamp/www/server.key; location / { index index.php index.html index.htm; } location /NavHawk2 { try_files $uri $uri/ index.php/; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_intercept_errors on; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 

错误日志和访问日志中没有填充404请求。 如果我删除了try_files行,我得到一个nginx 404页面。

看起来你需要使用fastcgi_split_path_info

一个例子:

 fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info;