Apache 2.4: Unknown Authz provider: ip

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, August 17, 2015

Follow me on Twitter as @mattiasgeniar

An Apache 2.4 server with a few missing modules can show the following error in your logs.

[core:alert] [pid 1234] [client 10.10.5.1:23801] /var/www/vhosts/site.tld/htdocs/.htaccess: Unknown Authz provider: ip, referer:

It’s this kind of config that triggers it, either in your vhost configurations or in your .htaccess files.

<IfModule mod_authz_core.c>
	<RequireAll>
		Require all granted
		...
		Require not ip 10.50.20.5
	</RequireAll>
</IfModule>

The idea is to use IP addresses as a means of allowing/blocking access to a particular vhost.

In order for this to work, you have to load the “host” module in Apache 2.4.

To fix this, add the following in your general httpd.conf file.

$ cat /etc/httpd/conf/httpd.conf
...
LoadModule authz_host_module modules/mod_authz_host.so

Reload your Apache and access control based on IP will work again.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.