Author Topic: How to disable directory listing  (Read 26355 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
How to disable directory listing
« on: May 08, 2016, 07:09:32 AM »
Hi all. I installed cwp on my vps but sounds like directory browsing is enabled and i added following code on httpd.conf but it not works at all:
Options -Indexes

I have inserted it in many places even in my domain directory but it not works.
Please help me.
Thanks.

Offline
*****
Re: How to disable directory listing
« Reply #1 on: May 08, 2016, 07:23:36 AM »
create .htaccess file and add Options -Indexes
or add Options -Indexes in you existing .htaccess file

in root folder of website files (in public_html)

Offline
*
Re: How to disable directory listing
« Reply #2 on: May 08, 2016, 07:37:25 AM »
Thank you. I was inserted it in there but seems the file was not changed at that time! this time tried changing that file from cwp root filemanager2 instead of  ftp and that worked.

Also i was inserted it in /usr/local/apache/conf/httpd.conf but it was not working there. Why ?
Thanks.

Offline
*****
Re: How to disable directory listing
« Reply #3 on: May 08, 2016, 08:04:34 AM »
you can't add this to apache config file

i will recommend you to use winscp
https://winscp.net/eng/download.php

Offline
*
Re: How to disable directory listing
« Reply #4 on: May 18, 2016, 10:29:20 AM »
Hello, there.

I have been using CWP Panel more than 1 year. Really thanks founder&contributers to give us such nice platform.

Please follow this small modification for disable "Directory indexing" or "Directory Listing" on all server-side.

Quote
[OPEN]
/usr/local/apache/conf/extra/httpd-userdir.conf
[FIND]
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
[REPLACE]
Options MultiViews SymLinksIfOwnerMatch IncludesNoExec
[IMPORTANT]
RESTART APACHE SERVICE AFTER CHANGES!!!

« Last Edit: May 18, 2016, 10:32:32 AM by tristar78 »

Offline
*****
Re: How to disable directory listing
« Reply #5 on: May 18, 2016, 10:38:45 AM »
thanks

but its not necessary at all
« Last Edit: May 18, 2016, 10:40:45 AM by Sandeep »

Offline
*
Re: How to disable directory listing
« Reply #6 on: October 18, 2016, 11:37:06 AM »
hmm.. i added an .htaccess with Options -Indexes but still get 500 Internal Server error
Did also try recommended edit to \usr\local\apache\conf\extra\httpd-userdir.conf
Also 500 Internal Server error with log files indicating "htaccess: Options not allowed here"

Offline
*****
Re: How to disable directory listing
« Reply #7 on: October 26, 2016, 09:18:37 AM »
hmm.. i added an .htaccess with Options -Indexes but still get 500 Internal Server error
Did also try recommended edit to \usr\local\apache\conf\extra\httpd-userdir.conf
Also 500 Internal Server error with log files indicating "htaccess: Options not allowed here"
kindly let us know the url and its path

Offline
*
Re: How to disable directory listing
« Reply #8 on: November 04, 2016, 08:43:44 PM »
Please apologize, i was away for some time.
I sent you a private message for Url & path

Offline
*****
Re: How to disable directory listing
« Reply #9 on: November 05, 2016, 08:06:31 AM »
Please apologize, i was away for some time.
I sent you a private message for Url & path

if you have .htaccess file kindly rename it to .htaccess.bak and check

Offline
*
Re: How to disable directory listing
« Reply #10 on: February 24, 2018, 11:45:52 AM »
Hello, there.

I have been using CWP Panel more than 1 year. Really thanks founder&contributers to give us such nice platform.

Please follow this small modification for disable "Directory indexing" or "Directory Listing" on all server-side.

Quote
[OPEN]
/usr/local/apache/conf/extra/httpd-userdir.conf
[FIND]
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
[REPLACE]
Options MultiViews SymLinksIfOwnerMatch IncludesNoExec
[IMPORTANT]
RESTART APACHE SERVICE AFTER CHANGES!!!

You are a savior!

Offline
*
Re: How to disable directory listing
« Reply #11 on: September 11, 2020, 05:54:59 PM »
Thank you..  :)

Hello, there.

I have been using CWP Panel more than 1 year. Really thanks founder&contributers to give us such nice platform.

Please follow this small modification for disable "Directory indexing" or "Directory Listing" on all server-side.

Quote
[OPEN]
/usr/local/apache/conf/extra/httpd-userdir.conf
[FIND]
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
[REPLACE]
Options MultiViews SymLinksIfOwnerMatch IncludesNoExec
[IMPORTANT]
RESTART APACHE SERVICE AFTER CHANGES!!!