Disable Directory listing in Apache on RHEL/CentOS server

Bismillahirrahmanirrahim..

How to disable Directory listing? Below are the steps.

1. Login to server as root user.

su - root

2. Edit httpd.conf

vi /etc/httpd/conf/httpd.conf

3. Find the line

Options Indexes FollowSymLinks

and remove Indexes from that line or replace with -Indexes

Options FollowSymLinks

or

Options -Indexes FollowSymLinks

4. Restart httpd service

/etc/init.d/httpd restart

done!

wassalam..

Advertisements
This entry was posted in Apache, Linux and tagged , , . Bookmark the permalink.

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