Linux – I have no “AllowOverride” directive in the apache2.conf

.htaccessapache-2.2linuxmod-rewritePHP

I have viewed my httpd.conf and apache2.conf and I have no AllowOverride directive in either of the files.

The .htaccess works fine. I have a bunch of rewrites in it, so I know it works.

Is apache2 by default set to "AllowOverride All"?

Anybody know if I should add this? Or if it would hurt to add it?

The reason for all this is that I get a bunch of errors in my apache2 error log.

Thanks

Best Answer

It is not an issue of AllowOverride(yes, Apache's default is All)
It's simply a logging of the fact, that a file was'nt found, an 404-error. You should find the same entry inside the access_log.

If you don't have further problems with this logging(maybe your space is rare, so you have to avoid it), you could leave it as it is. If you don't want errors of the level "error" to be logged, you can modify the log-level inside httpd.conf. Find the line starting with LogLevel . Change the following word(maybe: warn, error, notice, info, debug) to crit ->then restart the server.

But do this only if you have good reasons, because if you do this you don't get any error-level-errors logged in the future, and there are more errors than missing files.

Regarding to the question how to add AllowOverride: you can put these directives onto httpd.conf inside every <directory/>-Section. For example:

<directory "path/to/htdocs">
#some stuff
AllowOverride None
#more stuff
</directory>