GeoIP Konfiguration in Apache 2.4 vHosts
Posted: 2016-01-25 12:57
Hallo zusammen,
auf einem OpenSUSE 13.2 Server mit Apache 2.4x mit GeoIP 1.5.1 möchte ich einige Länder + Crawler whitelisten, alles andere sperren.
Hier die /etc/apache2/conf.d/mod_geoip.conf:
Die /var/lib/GeoIP/GeoIP.dat ist vorhanden.
Und hier der vHost:
Leider führt der Aufruf des vHosts zu einem
Mit einem
funktioniert der Aufruf einwandfrei.
Was übersehe ich?
Vielen Dank!
auf einem OpenSUSE 13.2 Server mit Apache 2.4x mit GeoIP 1.5.1 möchte ich einige Länder + Crawler whitelisten, alles andere sperren.
Hier die /etc/apache2/conf.d/mod_geoip.conf:
Code: Select all
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPEnableUTF8 On
# GeoIPOutput [Notes|Env|All]
GeoIPOutput All
<IfModule prefork.c>
GeoIPDBFile /var/lib/GeoIP/GeoIP.dat MemoryCache
</IfModule>
<IfModule !prefork>
GeoIPDBFile /var/lib/GeoIP/GeoIP.dat MMapCache
</IfModule>
</IfModule>
Und hier der vHost:
Code: Select all
<VirtualHost *:80>
ServerName domain.eu
UseCanonicalName Off
DocumentRoot /srv/www/vhosts/csi203/domain.eu/httpdocs/web
ErrorLog /srv/www/vhosts/csi203/domain.eu/logs/error_log
<Directory /srv/www/vhosts/csi203/domain.eu/httpdocs/web>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/srv/www/vhosts/csi203/domain.eu/httpdocs:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/srv/www/vhosts/csi203/domain.eu/httpdocs:/tmp"
</IfModule>
<IfModule mod_rewrite.c>
Options +SymLinksIfOwnerMatch
</IfModule>
AllowOverride None
<IfModule !mod_geoip.c>
Require all granted
</IfModule>
<IfModule mod_geoip.c>
Require all granted
# Whitelist
SetEnvIfNoCase User-Agent (googlebot|bingbot|yahoo!\sslurp) AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE AT AllowCountry
SetEnvIf GEOIP_COUNTRY_CODE CH AllowCountry
Allow from env=AllowCountry
# Freigabe Loopback
Require ip 192.168.0.1
</IfModule>
</Directory>
</VirtualHost>
.client denied by server configuration
Mit einem
Code: Select all
GeoIPEnable OffWas übersehe ich?
Vielen Dank!