NGINX路径分隔符/解析
在没有mod_rewrite的Apache中,我可以使用如下URI:NGINX路径分隔符/解析,nginx,url-rewriting,Nginx,Url Rewriting,在没有mod_rewrite的Apache中,我可以使用如下URI: /module/erp/service.php/application/workorder/list?start=0&limit=25 我需要配置或更改什么来支持NGINX server { listen 80; root /usr/share/nginx/www/web/public; index index.php index.html; s
/module/erp/service.php/application/workorder/list?start=0&limit=25
我需要配置或更改什么来支持NGINX
server {
listen 80;
root /usr/share/nginx/www/web/public;
index index.php index.html;
server_name apps.mydomain.com;
location / {
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/www;
#}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
有人能告诉我为了达到这个要求我可能需要添加什么吗
p、 我需要像Apache一样填充$\u服务器['PATH\u INFO']
编辑|
我相信我在这里找到了答案:
然后我遇到了访问被拒绝的问题,听起来解决方法如下:
有什么想法吗?好的,我上面提供的链接引导我通过奇怪的URI配置来解决问题 问题是cgi.fix\u pathinfo=0 我读过的大多数文章都认为这是一个巨大的安全漏洞——如果有人可能上传的话。我没有启用上载 安全权衡?也许……在我的例子中,它不像Apache那样重要