Hello

Hello, I have a nginx server is enabled.
And I have a file called htaccess
The file should cause to allowing accessed only from Israel.

But the file does not work,
I realized that it is related to nginx only.

What can you do?

Posted at Nginx Forum:

On 15 December 2013 15:21, nginx14 [email protected] wrote:

Hello, I have a nginx server is enabled.
And I have a file called htaccess
The file should cause to allowing accessed only from Israel.

But the file does not work,
I realized that it is related to nginx only.

Nginx does not use htaccess files at all.
You’ll need to work out how to express the Apache (htaccess file)
config in nginx’s config syntax.

Nginx does not use the .htaccess file, only Apache does. To prevent all
users from accessing your site, except those coming from Israel, you can
use the MaxMind Geo IP database in conjunction with an if statement in
the
Nginx configuration file. See
https://eng.eelcowesemann.nl/2011/blocking-unwanted-guests-with-nginx/ for
an
example. Note that use of the “if” statement is not considered a great
idea, see: If is Evil… when used in location context | NGINX.

Ilan

On Sun, Dec 15, 2013 at 10:21 AM, nginx14 [email protected] wrote:

hello


nginx mailing list
[email protected]
nginx Info Page

Ilan B.
Chief Technology Officer

6300 NE 1st Ave., Suite 203
Ft. Lauderdale, FL 33334
(954) 771-0914

http://www.twitter.com/time4learning
http://www.facebook.com/Time4Learning

Time4Learning.com - Online interactive curriculum for home use, PreK-8th
Grade.
Time4Writing.com - Online writing tutorials for high, middle, and
elementary school students.
Time4Learning.net - A forum to chat with parents online about kids,
education, parenting and more.
spellingcity.com - Online vocabulary and spelling activities for
teachers,
parents and students.