Apache Close Directory
Configuration files: Installation directory/apache/conf/httpd.conf
<directory/> #默认就会把/directory burst out; Close method: Options-indexes followsymlinks (-Indexes indicates opposite) +indexes +followsymlinks +execcgi # or -----> Options function to close: Options None allowoverride all Order allow,deny fromall Require all granted</Directory>
Apache Hidden version Number
window:default settings# Include conf/extra/httpd-default. conf # Remove the previous comment #
# Modify Httpd-default.conf
Servertokens full change to Servertokens Prod
Serversignature on change to serversignature off
liunx: Modify conf/extra/httpd-default.conf, much as the following message:servertokens full toServertokens Prodserversignature on change to Serversignature Off
Here are some of the possible assignments for Servertokens :
Servertokens Prod display "Server:apache"
Servertokens Major Display "Server:apache/2″
Servertokens Minor Display "Server:apache/2.2″
Servertokens Min Display "Server:apache/2.2.17″
Servertokens OS Display "server:apache/2.2.17 (Unix)"
Servertokens full Display "server:apache/2.2.17 (Unix) Php/5.3.5″
Nginx Close Directory
Modify Configuration:/usr/local/nginx/conf/nginx.conf
AutoIndex on; #默认管文件目录列表 #另外两个参数最好也加上去autoindex_exact_size off; # Default is on to show the exact size of the file, in bytes. # After change to OFF, the approximate size of the file is displayed, in kilobytes or MB or GB autoindex_localtime on; # The default is off and the file time displayed is GMT time. # When on, displays the file time as the file's server time
Nginx Hidden Version number
- # Add last line }
Edit a php-fpm configuration file, such as fastcgi.conf or fcgi.conf
# Find the following line fastcgi_param server_software nginx/$nginx _version; # modified to fastcgi_param server_software nginx;
PHP Hidden version number
Configuration file PHP.ini
expose_php = on # changed to OFF, the header information will be hidden x-powered-by:php/7.1.0
Web server Security