3

I'm running Nginx on Centos6.

For security reasons I'd like to change/remove the Server HTTP header contained in the response headers.

For instance,nginx's default Sever header looks like:I'm running Nginx on Centos6.

For security reasons I'd like to ch Server: nginx/1.12.2 But I'd like it to show something like: Server: mystartup/1.0. I tried these site confiurations, but none have worked.

server_tokens off;
proxy_pass_header 'New Server Name';

My server configuration: CentOS 6.9 Nginx version 1.12.2

joejoe12
  • 31
  • 1
  • 2

1 Answers1

4

You probably want add_header Server "mystartup/1.0" always.

womble
  • 95,029
  • 29
  • 173
  • 228