Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Internal error |
|
Author |
|
dakkerd
Joined: 14 Dec 2010 Posts: 1
|
Posted: Tue 14 Dec '10 12:52 Post subject: Internal error |
|
|
Hi all,
First time writing an .htaccess, so...
I try to allow indexing of a dir and later one adding a password for the specific dir. I herefor am writing an .htaccess file.
The server I'm working on denies indexing of dirs (I think) yet not the use of .htaccess files in itself. I make that statement for it does not return an internal error when adding the following lines in my htaccess file in the dir I would like to allow indexing for:
Code: | <Files index.html>
Order allow,deny
Allow from all
</Files> |
I do get an internal error when I use the following:
Code: | <Files index.html>
Order allow,deny
Allow from all
</Files>
<Directory>
Order allow,deny
Deny from all
</Directory> |
I used the above for they are very simple statements and I am merely checking whether the .htaccess file works.
I presume that this has something to do with a deny in some config file on the server. I checked the apache2.conf and modifying that one did not seem to do much. Maybe I modified it incorrectly, however...
I also think it might have something to do with the 000-default file (/etc/apache2/sites-enabled/) for their it is stated the following:
Code: | ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride Limit
Order allow,deny
allow from all
</Directory> |
Which I presume must become a +Indexes. But the file 000-default is a symbolic link and I don't know where it links to and where the file can be found. Or should I not touch this one and add a new file linking to the dir...
See, a lot of questions and help is very very much appreciated![/code] |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 15 Dec '10 20:48 Post subject: |
|
|
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
No Directory Indexes, No .htaccess support.
AllowOverride None
With that override of None, if you place a .htaccess file in there, it should 403 on everything.
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride Limit
Order allow,deny
allow from all
</Directory>
No Directory Indexes, but the 'Limit' override will allow you to use .htaccess files to limit access in that directory and anything below it.
<Files index.html>
Order allow,deny
Allow from all
</Files>
With an override of 'Limit', if this is in your htaccess file, all it will do is deny access to this one file. |
|
Back to top |
|
|
|
|
|
|