Focus on cloud service provider activities
Notes on website operation and maintenance

The method of batch setting 404 pages of the site on the pagoda panel (no need to set the site separately)

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.

 How to batch set 404 pages of the site on the pagoda panel (no need to set the site separately) - Page 1

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.

 How to batch set 404 pages of the site on the pagoda panel (no need to set the site separately) - Page 2

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.

Vote for you
Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( one )
Do not reprint without permission: Lao Zuo's Notes » The method of batch setting 404 pages of the site on the pagoda panel (no need to set the site separately)