Welcome! Log In Create A New Profile

Advanced

location: allow & deny trouble

Posted by avm 
avm
location: allow & deny trouble
December 10, 2009 05:24AM
День добрый. Недавно перешел с апача на nginx, все очень хорошо работает. Однако столкнулся с траблой.

На основе некоторых диапазонов ip созданы правила доступа, однако толи лыжи не едут, толи лыжник тупит.
Ситуация такова, что если обращаться к корню, то правила отрабатывают и в ответ получаю 403. Если же обращение идет к конкретному скрипту или файлу - nginx его свободно отдает.

система: Linux-2.6.31-gentoo-r6-x86
версия nginx: 0.7.62
версия php: 5.2.11-r1

кусок конфига:
server {
listen 0.0.0.0:80;
server_name localhost;

access_log /var/log/nginx/localhost.access_log main;
error_log /var/log/nginx/localhost.error_log info;

root /var/www/localhost/htdocs;

location ~ \.php$ {

fastcgi_pass unix:/var/run/php/fcgi;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/localhost/htdocs$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
location / {
allow 192.168.1.0/24;
allow *еще кучка ip*
deny all;
}
rewrite ^/torrentbar/(.*)$ /torrentbar/torrentbar.php?id=$1 last;

autoindex off;
}
Подозреваю что дело все же в лыжнике.



Edited 1 time(s). Last edit at 12/10/2009 05:25AM by avm.
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready