-2

Apache 2.2.22 on Debian 7.8 wheezy ignores any .htaccess file.

Part of apache2.conf:

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy all
</Files>

<Directory /var/www/>
        AllowOverride All
</Directory>

In the Apache logs, there's nothing about this problem.

Edit: Working now, I had to change AllowOverride None in <VirtualHost> to AllowOverride All in an included config file

CreeperMania
  • 41
  • 4
  • 9

1 Answers1

1

Where did you set your AllowOverride in apache2.conf? AllowOverride is about filepermissions within a specified directory. Therefor must you change your apache2.conf like this example:

<Directory /var/www>
  AllowOverride FileInfo
  ...
</Directory>

This is a good thread with more answers: How to Set AllowOverride all

This is the base documentation: http://httpd.apache.org/docs/trunk/mod/core.html#allowoverride This for the Directory - tag: http://httpd.apache.org/docs/trunk/mod/core.html#directory

You can use this also in VirtualHosts.

Edit: Here is an example from one of my virtualhosts:

DocumentRoot /var/www/Assignments/LoekBergman

<Directory /var/www/Assignments/LoekBergman>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride FileInfo
    Order allow,deny
    allow from all
</Directory>

This works for me.

Community
  • 1
  • 1
Loek Bergman
  • 2,192
  • 20
  • 18
  • I added this to my apache2.conf: ` AllowOverride All ` There's no error on restart now, but Apache still ignores .htaccess files. – CreeperMania Feb 14 '15 at 09:28