How to hide nginx and PHP version number

  
 

1, nginx

http{include mime.types;default_type application/octet-stream;server_tokens off; hide nginx version server_names_hash_bucket_size 128;client_header_buffer_size 32k;large_client_header_buffers 4 32k;client_max_body_size 50m;

2, php

Modify php.ini Find the expose_php item On to Off,


expose_php = Off

Restart:

/usr/local/php/sbin/php-fpm restart and kill -HUP `cat /usr/local/nginx/logs/nginx.pid`.
zh-CN"],null,[0.97063726],zh-CN"]]]

Copyright © Windows knowledge All Rights Reserved