ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

limit except и dav


  • To: nginx-ru@xxxxxxxxx
  • Subject: limit except и dav
  • From: "ivanko" <nginx-forum@xxxxxxxx>
  • Date: Sat, 24 Aug 2013 21:31:39 -0400
  • Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=helium.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=28IPs/TBK0iGGlgkoR9Xm10SENdiZQKaRM7BNPj8xMs=; b=a6le42oSn8nIISLtyRiMB3X+xyskLqhZ+URIxlRtIBhYb73/SfvcD3JLWu4vVHIJPKz+3uxsEQSkUqu5uZmKFSVGCnLtlkgNBp1gtXuDkmTxVNijaFoBbSTTqT0smDB9+hjpPTjE43VvXh6YEq44+XFjkzkSfekak/b1D6DLpn0=;

Друзья! прошу помочь с RTFM на тему совмещения dav и limit_except - не
выходит ограничить доступ (((
Хочется закрыть доступ с любыми методами от одного ip, а все остальные могут
путать и постить. 

nginx]$ date; ./sbin/nginx -V; sed -n "/#start/,/#end/ p" conf/nginx.conf;
./sbin/nginx -p $PWD -s reload; tail logs/error.log -n 1;/sbin/ifconfig
|grep 172.16.4.39; ls -l var/www/cert.crl ;curl -T ../cert.crl
http://172.16.4.39:8080/ -D -; curl -D - -o /dev/null
http://172.16.4.39:8080/cert.crl -s; grep -h 172.16.4.39
logs/*access.log|tail -2; ls -l var/www/cert.crl
Sun Aug 25 05:28:00 MSK 2013
nginx version: nginx/1.4.2
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configure arguments: --with-http_dav_module
        #start
server {
        listen 8080;
        server_name localhost
        client_body_temp_path client_body_temp;
        client_max_body_size 0;
        location / {
                limit_except GET {
                        deny 172.16.4.39;
                        allow all;
                }
                location ~* \.crl {
                        types {
                                application/x-pkcs7-crl crl;
                        }
                }
                root var/www/;
                dav_methods PUT;
                create_full_put_path on;
                dav_access group:r all:r;
        }
    }
        #end
2013/08/25 05:28:00 [notice] 7367#0: signal process started
          inet addr:172.16.4.39  Bcast:172.16.4.255  Mask:255.255.255.0
ls: var/www/cert.crl: No such file or directory
HTTP/1.1 100 Continue

HTTP/1.1 201 Created
Server: nginx/1.4.2
Date: Sun, 25 Aug 2013 01:28:00 GMT
Content-Length: 0
Location: http://172.16.4.39:8080/cert.crl
Connection: keep-alive

HTTP/1.1 200 OK
Server: nginx/1.4.2
Date: Sun, 25 Aug 2013 01:28:00 GMT
Content-Type: application/x-pkcs7-crl
Content-Length: 145188
Last-Modified: Sun, 25 Aug 2013 01:28:00 GMT
Connection: keep-alive
ETag: "52195da0-23724"
Accept-Ranges: bytes

172.16.4.39 - - [25/Aug/2013:05:26:49 +0400] "PUT /cert%2Ecrl HTTP/1.1" 201
25 "-" "curl/7.15.5 (i386-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b
zlib/1.2.3 libidn/0.6.5"
172.16.4.39 - - [25/Aug/2013:05:26:49 +0400] "GET /cert.crl HTTP/1.1" 200
145188 "-" "curl/7.15.5 (i386-redhat-linux-gnu) libcurl/7.15.5
OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"
-rw-r--r-- 1 ivanko users 145188 Aug 25 05:28 var/www/cert.crl
nginx]$

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?21,242191,242191#msg-242191

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.