Hide Apache Information on Ubuntu VPS/Dedicated Web server

0


1. Modify security.conf :

sudo nano /etc/apache2/conf-enabled/security.conf

Change “ServerTokens OS” to “ServerTokens Prod” then
Change “ServerSignature On” to “ServerSignature Off”

2. Restart the apache2 :

sudo service apache2 restart
* Restarting web server apache2 [ OK ]

3. Perform the following command before change and after change the configuration :

sudo curl -I http://192.xxx.x.123

Done!!

 

How do I disable directory browsing?

nano /etc/apache2/apache2.conf

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

to

<Directory /var/www/>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>

then restart apache by:

sudo service apache2 restart

LEAVE A REPLY

Please enter your comment!
Please enter your name here