Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
In the previous article to share the "Set 301 Redirect Method" article, mentioned 301, that must also say 404 error page. Because we installed the default LNMP 404 pages will not automatically set, and will not default to the program's 404 error page, but we need to manually set. How do you set it? We look down together.
The first step is to edit the/usr/local/nginx/conf/nginx.conf file and add the following code to the HTTP area.
Fastcgi_intercept_errors on;
The second step, edit you need to add 404 pages of the Web site conf file, corresponding to the usr/local/nginx/conf/vhost/xxxx.com.conf, in the server area to add code;
Error_page 404 =/404.html;
The third step is to restart the LNMP;
/ROOT/LNMP restart
To summarize, we can test the return status by/usr/local/nginx/sbin/nginx-t.
The revisit file/usr/local/nginx/conf/nginx.conf syntax is OK
Revisit file/usr/local/nginx/conf/nginx.conf test is successful
If this is the return state, it is correct.
This article fixed link: http://www.laozuo.org/215.html | Old Left Blog