LNMP10.0 设置404错误页面


LNMP系统设置404错误页面的教程分享,为了公益事业,本人测试通过的技术。
http://yibo.iyiyun.com/User/install/web404/
请大家支持公益事业
第一步,编辑  /usr/local/nginx/conf/nginx.conf 文件,在http区域添加下面的代码;
fastcgi_intercept_errors on;
 
第二步,编辑你需要添加404页面的网站的conf文件,对应在 usr/local/nginx/conf/vhost/5icool.org.conf,在server区域添加代码;
error_page 404 = /404.html;
第三步,重启 LNMP;
/root/lnmp restart
总结,我们可以通过 /usr/local/nginx/sbin/nginx -t 来测试返回状态是否正确。
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
如果是上述返回状态,就是正确的。
 


发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注