Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ограничить доступ к пап ке по ip
On Sat, Sep 17, 2011 at 08:54:56AM -0400, EDark wrote:
> щас совсем голова отказывает просто
> скажите да)))
>
> location ^~ /admin/ {
> proxy_pass http://IP:8080;
> proxy_redirect http://site.ru:8080/ /;
> proxy_set_header Host $host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
> proxy_set_header X-Real-IP $remote_addr;
> allow 187.233.0.0/16;
> deny all;
> }
>
> да?
Нет.
location ^~ /admin/ {
root /var/www/user/data/public_html;
allow 187.233.0.0/16;
deny all;
location ~ \php$ {
proxy_pass http://IP:8080;
proxy_redirect http://site.ru:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
И поставить в .htaccess:
Deny from all
Allow from 127.0.0.1
--
Игорь Сысоев
http://sysoev.ru
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|