Apache is the largest web server software in the world. It is well known for its installation and stability. By default, it has some loose restrictions and can be further configured to reinforce its security.
1. Hide version information:
ServerSignature off # No footer information output ServerTokens prod # No apache version information output
2. Run with a low-Permission User:
User nobody
Group nobody
3. website directory settings:
<Directory "/var/www/html"> # Options Indexes FollowSymLinks # cancel Directory browsing, link to other directories AllowOverride None # disable htaccess php_admin_value open_basedir/var/www/html/# Restrict the Active Directory to prevent cross-site access. multiple directories are separated by Order allow and deny.
Allow from all </Directory>
4. Hide the php version, edit the php configuration file php. ini, and add or modify the file:
1
Expose_php Off