Simple tips to secure Apache and php5

Posted: 08/03/2012 in Apache, Php
Tags: , , ,

Secure Apache

pico /etc/apache2/conf.d/security

ServerSignature Off
ServerTokens Prod

/etc/init.d/apache2 restart

Secure PHP

pico /etc/php5/cgi/php.ini

pico /etc/php5/apache2/php.ini

expose_php = Off
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
magic_quotes_gpc = Off
safe_mode = Off
register_globals = Off
allow_url_fopen = Off

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s