Nginx 配置404错误页面跳转

Nginx  配置404错误页面跳转
1、创建自己的404.html页面 2、更改nginx.conf在http定义区域加入: fastcgi_intercept_errors on; 3、修改单独网站配置文件,default.confg(或者nginx.conf) 在server 区域加入: error_page 404  404/index.html; 4、更改后重启nginx,~/nginx/sbin/nginx -s reload   #502 等错误可以用同样的方法来配置     error_page  500 502 503 504  /50x.html;   备注: 1.必须要添加:fastcgi_interce...

让Nginx支持pathinfo

让Nginx支持pathinfo
Nginx服务器默认不支持pathinfo, 在需要pathinfo支持的程序中(如thinkphp),则无法支持”/index.php/Home /Index/index”这种网址   # 典型配置 location ~ \.php$ { root           html; fastcgi_pass   127.0.0.1:9000; fastcgi_index  index.php; fastcgi_param  SCRIPT_FILENAME  $DOCUMENT_ROOT$fastcgi_script_name; include        fastcgi_params; }   # 修改第1,5,6行,支持pathinfo locat...
Copyright © 严佳冬 保留所有权利.   Theme  Ality 百度地图 苏ICP备19045515号-2

用户登录

分享到: