The first step: a custom error page to be ready first error picture (here defined error.jgp pictures)
Step two: Modify the main configuration file:
[root@localhost html]# ls
40x.html 50x.html error.jpg index.html linux.jpg trror.txt
[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf
Add the following command, which is a custom error page 404 401 403 408 and
error_page 403 404 401 408 / 40x.html; / / Once the page newspaper 404401403408 wrong to let him go find 40x.html
LOCATION = / 40x.html { // find LOCATION matching 40x.html HTML
the root HTML;
}
The results are shown below: