The practice of personalized webpage 404

The practice of personalized webpage 404

1. Modify the main configuration file: vim /etc/nginx/nginx.conf
error_page 404 /404.html; //write in
The practice of personalized webpage 404
2. Modify the sub-configuration file: vim /etc/nginx/conf.d/default.conf
The practice of personalized webpage 404
3. In Write
location = /404.html {
root /usr/share/nginx/html;
}
The practice of personalized webpage 404
4. Create a 404 web page: vim /usr/share/nginx/html/404.html
The practice of personalized webpage 404
5. Visit: Enter the ip address 10.8 .162.6/adsajfojfosihdf (behind to type)
The practice of personalized webpage 404

Guess you like

Origin blog.51cto.com/14881339/2540181