Score:0

Customize server name for error pages in NGINX

bf flag
Tom

Is it possible to customize NGINX so when displaying a 500 error page it displays a custom name instead of NGINX?

Similar to what Cloudflare does in some cases by displaying:

500 Internal Server Error
------------------------
    cloudflare-nginx

My question may seem a bit silly, but if a user of mine indicates it is my server, it presented an error, I can identify whether this actually occurred on our server or during the transit of the request.

Nikita Kipriyanov avatar
za flag
Long time answered [here](https://stackoverflow.com/questions/246227/how-do-you-change-the-server-header-returned-by-nginx). Or, patch and build your own version of Nginx, as Cloudflare does.
Score:0
us flag

The simple way is writing a file ( could be a html ) with your custom page and use this file in error_page directive. Oficial error_page reference.

Something like:

error_page 500 502 503 504 /my_custom_error.html;

And the users will receive this page when got an error.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.