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:
http://forum.nginx.org/read.php?2,245545,245545#msg-245545

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
http://eng.eelcowesemann.nl/linux-unix-android/nginx/nginx-blocking/ for
an
example. Note that use of the “if” statement is not considered a great
idea, see: http://wiki.nginx.org/IfIsEvil.

Ilan

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

http://forum.nginx.org/read.php?2,245545,245545#msg-245545


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Ilan B.
Chief Technology Officer
Time4Learning.com

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs