How To Hide Apache2 and Php5 Version

Valic —  July 23, 2011 — Leave a comment

You may be concerned about the security of your servers, and you should know that hackers often try to break your server

One way to secure your LAMP server would stop Apache and PHP5 to send details of their versions or other valuable informations.

1. How to hide Apache2 version?

In http.conf file or apache2.conf add the following lines:

ServerSignature Off

ServerTokens  Prod

2. How to hide the PHP5 version?

In php.ini file, usually /etc/php5/ or /etc/php5/apache2/ add the following lines:

expose_php = Off

display_errors = Off

After that you need to restart apach2 server with the following command:

/etc/init.d/apache2 restart

Thats it! Your server is more secure now.



Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

No Comments

Be the first to start the conversation.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.