Today, Lao Zuo met a netizen who set up more than ten websites in one server, but he used to collect a lot of site data, but now after deleting the data, he hopes to set up articles that may have indexes and give them 404 jump pages. Although his program has a default 404 page, it can not achieve his goal of drainage. He hopes to set a unified 404 page.
In fact, setting is very simple. We can find out whether it is Nginx or Apache and set it directly in the engine configuration file. Here Lao Zuo sees that he uses the pagoda panel, which is set directly in his Nginx.
Here we find the Nginx engine of the current pagoda panel. Then check the code in the configuration modification. Don't panic. It is not complicated.
See the code:
#error_page 404 /404.html;
We just need to remove the previous # At the same time, we need to add a 404 page HTML, We can customize it.
We can set this path ourselves. Generally, we can add a custom 404 page. In this way, all our sites can have a 404 error page. Of course, don't forget to restart NGINX before it takes effect.