
28th September 2011, 10:24
|
|
Member
|
|
Join Date: Sep 2008
Posts: 82
Thanks: 0
Thanked 1 Time in 1 Post
|
|
How can I disable directory browsing in apache
Hello
I use ispconfig2 on opensuse11.1, apache,php5 work on it.
it works well But. directory indexes is enable. I can't disable it ?
cat /etc/apache2/httpd.conf;
<Directory /wwwroot1/*/web>
Options -Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
Order allow,deny
Allow from all
<Files ~ "^\.ht">
Allow from all
</Files>
</Directory>
How can I disable directory browsing in apache ?
Thanks
|

29th September 2011, 17:30
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Did you set
in the correct vhost? Did you check if there's maybe an .htaccess file where directory indexes are enabled?
|

29th September 2011, 19:32
|
|
Member
|
|
Join Date: Sep 2008
Posts: 82
Thanks: 0
Thanked 1 Time in 1 Post
|
|
for example, a vhost is located in /wwwroot1/web106
I added .htaccess file to web106/web/
and if I put down it " IndexIgnore */* " , it works
But if I put down Options -Indexes I get internal server error.
and it gets an error message;
.htaccess: Options not allowed here
I can't see any configure that it is enable +indexes
Also Allowoverride is All
What could be the problem ?
|

30th September 2011, 11:10
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
I guess you set
and
in the wrong locations. I'd set these in <Directory> containers inside your vhost.
|

30th September 2011, 11:54
|
|
Member
|
|
Join Date: Sep 2008
Posts: 82
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hello
the apache server doesn't allow me to configure "Allowoverride All" into vhost ( onto ispconfig control panel )
Therefore I configured "Allowoverride All" into /etc/apache2/httpd.conf
Note: I use opensuse11.1 and ispconfig2
|

1st October 2011, 09:28
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Quote:
Originally Posted by arastirici
Hello
the apache server doesn't allow me to configure "Allowoverride All" into vhost ( onto ispconfig control panel )
|
You can use the Apache Directives field on the Options tab in ISPConfig.
|

1st October 2011, 10:04
|
|
Member
|
|
Join Date: Sep 2008
Posts: 82
Thanks: 0
Thanked 1 Time in 1 Post
|
|
These apache directives in options tab of ispconfig works but Options -indexes does not work.
That's very interesting. i think it is a bug.
|

2nd October 2011, 09:45
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
What exactly did you put in the Apache Directives field?
Did you wrap <Directory ...></Directory> around the Options line?
|

2nd October 2011, 19:37
|
|
Member
|
|
Join Date: Sep 2008
Posts: 82
Thanks: 0
Thanked 1 Time in 1 Post
|
|
I put down as following in ispconfig's apache directives;
<Directory /wwwroot1/web167/web>
Options -Indexes
</Directory>
I get an internal server error.
if I put down "IndexIgnore */*" in .htaccess
it works.
|

3rd October 2011, 19:01
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
And there's nothing in Apache's error logs?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 15:00.
|
Recent comments
1 day 5 hours ago
1 day 14 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 20 hours ago
1 day 21 hours ago
1 day 23 hours ago
2 days 37 min ago
2 days 16 hours ago
2 days 17 hours ago