| Ways Securing Apache |
|
|
|
| How To - Apache HTTP Server | |
| Written by Christian Foronda | |
| Thursday, 18 March 2010 11:04 | |
|
Hide The Apache Version Number And Other Sensitive Information. ServerSignature Off ServerTokens Prod The Server: Apache Make Sure Apache Is Running Under Its Own User Account And Group User apache Group apache Ensure That Files Outside The Web Root Are Not Served <Directory /> Order Deny,Allow Deny from all Options None AllowOverride None </Directory> <Directory /web> Order Allow,Deny Allow from all </Directory> Turn Off Directory Browsing You can do this with an Options -Indexes Turn Off Server Side Includes This is also done with the Options -Includes Turn Off CGI Execution If you're not using CGI turn it off with the Options -ExecCGI Don't Allow To Follow Symbolic Links Options -FollowSymLinks Turning Off Multiple Options Options None If you only want to turn off some separate each option with a space in your Options -ExecCGI -FollowSymLinks -Indexes Turn Off Support For .htaccess Files This is done in a AllowOverride None If you require Overrides ensure that they cannot be downloaded, and/or change the name to something other than AccessFileName .httpdoverride <Files ~ "^\.ht"> Order allow,deny Deny from all Satisfy All </Files> Disable Any Unnecessary Modules Go through the apache module documentation and learn what each module you have enabled actually does. mod_imap mod_include mod_info mod_userdi mod_statusr mod_cgi mod_autoindex Make Sure Only Root Has Read Access To Apache's Config And Binaries Aassuming your apache installation is located at # chown -R root:root /usr/local/apache # chmod -R o-rwx /usr/local/apache Lower The Timeout Value By default the Timeout 45 Limit Large Requests This can also be useful for mitigating the effects of a denial of service attack. LimitRequestBody 1048576 If you're not allowing file uploads you can set it even smaller. Limiting The Size Of An XML Body If you're running LimitXMLRequestBody 10485760 Restricting Access By IP Restrict access to your intranet to allow only the 176.16 network: Order Deny,Allow Deny from all Allow from 176.16.0.0/16 Or by IP: Order Deny,Allow Deny from all Allow from 127.0.0.1
Similar articles
|
|
| Last Updated on Thursday, 18 March 2010 11:08 |


