I used this guide to block visitors from certain countries: http://www.howtoforge.com/nginx-how-to-block-visitors-by-country-with-the-geoip-module-debian-ubuntu It worked perfect for domain1.com on my vps. I just created domain2.com. I see visitors from the blocked countries (in google analytics). Does not make sence since the block was done on ngionx.conf and not on the domain. I have to examine awstats too later on. Comments?
I just checked and the following code was missing from the domain1 vhost file too: Code: if ($allowed_country = no) { return 444; } This is very strange. Maybe ispconfig changed the vhost file settings and overwrote my changes.
I just checked. The obove code was AGAIN missing from domain1 and domain2 vhost files. I was editing the vhost files and I think ispconfig is overwriting my changes. So I decided to enter the above code through ispconfig3, under Sites -> Web Domain -> Options. I did this for both domains. Indeed the code went to the two vhost files. I hope I will not loose the setting again. Complete summary of solution: http://bbb-solutions.blogspot.gr/2014/02/block-visitors-by-country.html
Never edit a vost file manually! You have t add the code that falko posted in the nginx directives field of the website.