Secure root directory

The root directory of server containing all the important files therefore its always better to restrict the root directory access from the browser. To Secure root directory refer to the following steps.

Open the servers main Apache configuration file and add the following code and restart the Apache web service.

1st) Open /etc/httpd/conf/httpd.conf file

2nd) Add the code

<Directory />
    Options None
    Order deny,allow
    Deny from all
</Directory>

3rd) Restart the Apache web service

/etc/init.d/httpd restart
or
service httpd restart


 

 

 

About Anant 373 Articles
Senior technical writer