Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Apache 2.2 instead of 2.4, which explains the error in the title. After Brain99 posted his comment, I found out that I had 2.2, adjusted my configuration to what he suggested (which still didn't work), tried around a bit, slept a night and the next day I found out, that I forgot the Include statements for the mod-enabled directory!

For now I just need the server to let me download files from one specific folder (in my case I chose /opt/myFolder for that task)

Distribution is Debian 6.0

*edit_start*

Apache version is 2.4, according to their official documentation, the Order/Allow clauses are deprecated and should not be used anymore

I'm an idiot: Apache version is 2.2.

*edit_end* My directory directives in apache2.conf look like this:

<IfModule dir_module>
                DirectoryIndex index.html index.htm index.php
</IfModule>
ServerRoot "/etc/apache2"
DocumentRoot "/opt/myFolder"
<Directory />
        Options FollowSymLinks
        AuthType None
        AllowOverride None
        Require all denie
</Directory>
<Directory "/opt/myFolder/*">
        Options FollowSymLinks MultiViews
        AllowOverride None
        AuthType None
        Require all allow
</Directory>

When I try to access a file inside that folder (http://myserver.de/aTestFile.zip) I get an Internal Server Error. Also Apache writes the following error into it's log:

configuration error:  couldn't check user.  Check your authn provider!: /aTestFile.zip

Why would I need an authn provider if I don't want any authentication? Also I hope someone can explain to me what kind of AuthenticationProvider I'd need for that. Everytime I search for those things I get pointed at people asking how to protect files/directories with passwords or restrict access to some IP addresses, which doesn't really help me.

ok, since I've Apache version 2.2, here is the error I get when using the Order/Deny/Allow commands instead of AuthType/Require:

Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration.
share|improve this question

1 Answer 1

up vote 5 down vote accepted

I believe this is due to the following erroneous configuration directives:

Require all denie
Require all allow

Try the following configuration instead:

<Directory />
        Options FollowSymLinks
        AuthType None
        AllowOverride None
        Order deny,allow
        Deny from all
</Directory>
<Directory "/opt/myFolder/*">
        Options FollowSymLinks MultiViews
        AllowOverride None
        AuthType None
        Order deny,allow
        Allow from all
</Directory>

Edit 2: Your problem could also be due to the mod_authz_host module not being loaded. You can try enabling this with a2enmod authz_host and restarting apache.

Also, it seems that AuthType None is invalid. Just remove the AuthType directive entirely from your configuration.

share|improve this answer
    
well, in that case Apache doesn't start at all. Output from apachectl start Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration. Are you sure that this option is still available in Apache 2.4? I saw a few forum threads where it was said that those options were dropped and replaced by the Require clauses. –  Steffen Winkler Aug 30 '12 at 13:31
    
See my edited answer. –  brain99 Aug 30 '12 at 13:46
    
I'm stupid. My apache version is 2.2. But why do I get that error? –  Steffen Winkler Aug 30 '12 at 14:19
    
also, even with your edits it doesn't work. –  Steffen Winkler Aug 30 '12 at 14:36
    
to your 2nd edit: AuthType None is supported, according to official documentation. Anyway, when I remove it, apache says that it couldn't perform authentication. AuthType is not set. –  Steffen Winkler Aug 30 '12 at 14:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.