Nginx1.4+设置默认404页面
来源:互联网 发布:马伯庸作品知乎 编辑:程序博客网 时间:2024/06/03 11:33
之前参考了不少文件,配置均不生效。
过程(ubuntu):
1.到nginx安装目录新建一个404.html /usr/share/nginx/html
2.到各server节点下新增404处理逻辑
vim /etc/nginx/sites-enabled/default
server { listen 80 ; server_name m.xx.com; root /var/www/m; index m.html; error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html; }}
误解一, 要vim /etc/nginx/nginx.conf ,在http块加fastcgi_intercept_errors参数
http { #fastcgi_intercept_errors on;
This module allows Nginx to interact with FastCGI processes and control what parameters are passed to the process.
这个模块仅对fastcgi生效,yes就是说纯html的跳转,其实不加这个参数即可。
0 0
- Nginx1.4+设置默认404页面
- apache 设置默认页面
- 设置页面默认图片
- 设置网站默认页面
- apache的默认页面设置
- jsp页面默认字符集设置
- 设置jsp页面默认编码
- viewPager设置当前默认页面
- Spring Boot--默认页面设置
- asp.net设置页面默认按钮
- Apache 建立虚拟目录和设置默认页面
- MyEclipse设置JSP页面默认编码方式:
- Apache 建立虚拟目录和设置默认页面
- 关于tomcat默认页面的设置!!!
- MyEclipse设置JSP页面默认编码方式
- apache 下设置虚拟目录和默认页面
- ECLIPSE - 新建jsp页面默认模板设置
- 关于tomcat默认页面的设置!!!
- Httpclient4.3实例。 每个版本接口变更都巨大
- jsp
- PPTP - GRE
- Continuous Integration with Xcode 5
- ZmEu漏洞扫描
- Nginx1.4+设置默认404页面
- Nginx rewrite permanent
- WindowManager.LayoutParams全解
- Android 异步网络请求及协调CountDownLatch
- Java多线程-工具篇-BlockingQueue
- 多进程编程:fork()函数
- universalimageloader增加Refer校验
- Extjs 查看图片并添加放大缩小功能
- 黑马程序员——String