Hello readers, today I guide you to "Remove Apache Version and OS Identity from Error Pages".
At the time you install Apache on your server, it displays the version of your web server installed on your server along with the OS name of your server in error pages. It also list the information about modules installed on your server which can cause the safety issue on your server.
In above picture, you will see a 404 error page where your web page is showing its version of the OS installed on the server. This may be a major security issue to your web server. To prevent to display such information to the world, you need to make some changes in Apache main settings file.
Open configuration data file within your selected editor tool and search for "ServerSignature", it's by default "On". We need to Away and the second line "ServerTokens Prod" tells the web page to come back only Apache as the product in the server response header on the every web page request, It suppresses the OS, major and minimal version info.
ServerSignature Off
ServerTokens Prod
If you are using ubuntu then you can put the above 2 lines into three files, which are mention below.
/etc/apache2/conf-available/security.conf
/etc/apache2/conf-enabled/security.conf
/etc/apache2/conf.d/security
Restart Apache
sudo service apache2 stop
sudo service apache2 start
or
sudo service apache2 restart
Hope it helps you.
0 Comment(s)