Hide the Nginx version info

Juan Fco. Giordana juangiordana at gmail.com
Wed Nov 25 09:09:16 MSK 2009


himesh wrote:
> Hi all,
> 
> Is there a possible way too hide the nginx version that is shown for
> a return value of 403, 500 etc..

http://wiki.nginx.org/NginxChsHttpCoreModule#error_page

server {
     listen 80;
     server_name www.example.com;
     root /srv/www/www.example.com
     index index.html;
     ...

     # redirect server error pages to the static page /50x.html
     error_page 404 /404.html;
     error_page 410 /410.html;
     error_page 413 /413.html;
     error_page 503 /503.html;
     error_page 500 502 504 /50x.html;

     location / {
         ...
     }
}




More information about the nginx mailing list