问题原文
原帖链接 · jamboNum5 · CC BY-SA 3.0
We had feedback from our pentest report saying we should turn off server tokens. This is stop people being able to see which version of PHP we are using, and limit their ability to target the specific PHP version.
I have added the following to nginx.conf, under the http block:
server_tokens off;
But what tools can I use to check this change has taken affect?
已采纳解答
原帖链接 · jamboNum5 · CC BY-SA 3.0
After a bit more googling, I have found curl command can check the server headers which shows both server tokens and php versions:
curl -I -L www.example.com
Thanks to Alexey for pointing out the change needed in PHP.
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Thu, 04 Jun 2015 10:49:35 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.example.com
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 04 Jun 2015 10:49:36 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Thu, 04 Jun 2015 10:49:35 GMT
Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0
ETag: "1433414975"
Content-Language: en
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
