3

I added

server_tokens off;

to http{} section of /etc/nginx/nginx.conf file and restarted nginx with

service nginx restart

command. but server still publishing the server tokens when responsing to request. I also checked under the sites-enabled/available config files for if is there any server_tokens on, but no there isn't.

xecute
  • 111
  • 1
  • 9

1 Answers1

3

:)

I finally found the reason. "X-Powered-By" header was added by PHP. so I edited the php.ini to

expose_php = off;

and it's gone. Just "Server: nginx" left and it's not important for me :)

xecute
  • 111
  • 1
  • 9