WebDAV с закачкой из инета

Andrey Ignatov andr.pl at gmail.com
Thu Sep 27 15:15:31 MSD 2007


On Thu, Sep 27, 2007 at 02:27:15PM +0400, Монашёв Михаил wrote:
> Здравствуйте, Андрей.
> 
> > разве GET и HEAD не будут разрешены по умолчанию для всех ?
> 
> не будут. В том то и дело. Пробовал так уже.

хм, сейчас попробовал у себя сл. конфигурацию:

------------------------------------------------------------------------
# nginx.conf

user  			www www;
worker_processes  	1;

error_log	/var/log/nginx-debug.log debug;

events {
	worker_connections	1024;
	use			kqueue;
}

http {
	include       mime.types;
	default_type  application/octet-stream;

	sendfile	on;
	tcp_nopush	on;

	keepalive_timeout  5;

	proxy_temp_path		/usr/local/www/tmp/proxy_temp;
	client_body_temp_path	/usr/local/www/tmp/client_body_temp;

	server {
		listen		*:80;
		server_name	c4.sk;

		location /	{
			root                    /usr/local/www/nginx;
			limit_except GET {
				deny all;
			}
		}
	}
}
------------------------------------------------------------------------

Если я правильно понимаю, должно запрещать GET для всех.

Пробую ..

%>telnet c4.sk 80
Trying 192.168.18.14...
Connected to c4.sk.
Escape character is '^]'.
GET /index.html HTTP/1.1
Host: c4.sk

HTTP/1.1 200 OK
Server: nginx/0.6.11
Date: Thu, 27 Sep 2007 11:10:33 GMT
Content-Type: text/html
Content-Length: 3
Last-Modified: Sun, 29 Jul 2007 12:14:59 GMT
Connection: keep-alive
Accept-Ranges: bytes

C4
Connection closed by foreign host.

Как видно ответ получаем.

%>nginx -V
nginx version: nginx/0.6.11
configure arguments: --prefix=/usr/local/etc/nginx --with-cc-opt=-I
/usr/local/include --with-ld-opt=-L /usr/local/lib
--conf-path=/usr/local/etc/nginx/nginx.conf
--sbin-path=/usr/local/sbin/nginx --pid-path=/var/run/nginx.pid
--error-log-path=/var/log/nginx-error.log --user=www --group=www
--with-debug
--http-client-body-temp-path=/var/tmp/nginx/client_body_temp
--http-proxy-temp-path=/var/tmp/nginx/proxy_temp
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp
--http-log-path=/var/log/nginx-access.log --with-http_dav_module
--with-http_stub_status_module

В аттаче debug-лог этого соединения.


-- 
Andrey Ignatov
Skript, System administrator
-------------- next part --------------
2007/09/27 15:10:23 [debug] 97992#0: kevent events: 1
2007/09/27 15:10:23 [debug] 97992#0: kevent: 5: ft:-1 fl:0000 ff:00000000 d:1 ud:08101000
2007/09/27 15:10:23 [debug] 97992#0: accept on 0.0.0.0:80, ready: 1
2007/09/27 15:10:23 [debug] 97992#0: malloc: 080E0100:256
2007/09/27 15:10:23 [debug] 97992#0: *4 accept: 192.168.18.1 fd:6
2007/09/27 15:10:23 [debug] 97992#0: *4 event timer add: 6: 60000:1185542959
2007/09/27 15:10:23 [debug] 97992#0: *4 kevent set event: 6: ft:-1 fl:0025
2007/09/27 15:10:23 [debug] 97992#0: timer delta: 38161
2007/09/27 15:10:23 [debug] 97992#0: posted events 00000000
2007/09/27 15:10:23 [debug] 97992#0: worker cycle
2007/09/27 15:10:23 [debug] 97992#0: kevent timer: 60000, changes: 1
2007/09/27 15:10:30 [debug] 97992#0: kevent events: 1
2007/09/27 15:10:30 [debug] 97992#0: kevent: 6: ft:-1 fl:0020 ff:00000000 d:26 ud:08101079
2007/09/27 15:10:30 [debug] 97992#0: *4 malloc: 080CE000:652
2007/09/27 15:10:30 [debug] 97992#0: *4 malloc: 080D7000:1024
2007/09/27 15:10:30 [debug] 97992#0: *4 malloc: 080E2000:4096
2007/09/27 15:10:30 [debug] 97992#0: *4 http process request line
2007/09/27 15:10:30 [debug] 97992#0: *4 recv: eof:0, avail:26, err:0
2007/09/27 15:10:30 [debug] 97992#0: *4 recv: fd:6 26 of 1024
2007/09/27 15:10:30 [debug] 97992#0: *4 http request line: "GET /index.html HTTP/1.1"
2007/09/27 15:10:30 [debug] 97992#0: *4 http uri: "/index.html"
2007/09/27 15:10:30 [debug] 97992#0: *4 http args: ""
2007/09/27 15:10:30 [debug] 97992#0: *4 http exten: "html"
2007/09/27 15:10:30 [debug] 97992#0: *4 http process request header line
2007/09/27 15:10:30 [debug] 97992#0: *4 event timer del: 6: 1185542959
2007/09/27 15:10:30 [debug] 97992#0: *4 event timer add: 6: 60000:1185549920
2007/09/27 15:10:30 [debug] 97992#0: timer delta: 6961
2007/09/27 15:10:30 [debug] 97992#0: posted events 00000000
2007/09/27 15:10:30 [debug] 97992#0: worker cycle
2007/09/27 15:10:30 [debug] 97992#0: kevent timer: 60000, changes: 0
2007/09/27 15:10:33 [debug] 97992#0: kevent events: 1
2007/09/27 15:10:33 [debug] 97992#0: kevent: 6: ft:-1 fl:0020 ff:00000000 d:13 ud:08101079
2007/09/27 15:10:33 [debug] 97992#0: *4 http process request header line
2007/09/27 15:10:33 [debug] 97992#0: *4 recv: eof:0, avail:13, err:0
2007/09/27 15:10:33 [debug] 97992#0: *4 recv: fd:6 13 of 998
2007/09/27 15:10:33 [debug] 97992#0: *4 http header: "Host: c4.sk"
2007/09/27 15:10:33 [debug] 97992#0: timer delta: 2144
2007/09/27 15:10:33 [debug] 97992#0: posted events 00000000
2007/09/27 15:10:33 [debug] 97992#0: worker cycle
2007/09/27 15:10:33 [debug] 97992#0: kevent timer: 57856, changes: 0
2007/09/27 15:10:33 [debug] 97992#0: kevent events: 1
2007/09/27 15:10:33 [debug] 97992#0: kevent: 6: ft:-1 fl:0020 ff:00000000 d:2 ud:08101079
2007/09/27 15:10:33 [debug] 97992#0: *4 http process request header line
2007/09/27 15:10:33 [debug] 97992#0: *4 recv: eof:0, avail:2, err:0
2007/09/27 15:10:33 [debug] 97992#0: *4 recv: fd:6 2 of 985
2007/09/27 15:10:33 [debug] 97992#0: *4 http header done
2007/09/27 15:10:33 [debug] 97992#0: *4 event timer del: 6: 1185549920
2007/09/27 15:10:33 [debug] 97992#0: *4 generic phase: 0
2007/09/27 15:10:33 [debug] 97992#0: *4 find location for "/index.html"
2007/09/27 15:10:33 [debug] 97992#0: *4 find location: "/"
2007/09/27 15:10:33 [debug] 97992#0: *4 find location for "/index.html"
2007/09/27 15:10:33 [debug] 97992#0: *4 using configuration "/"
2007/09/27 15:10:33 [debug] 97992#0: *4 http cl:-1 max:1048576
2007/09/27 15:10:33 [debug] 97992#0: *4 generic phase: 2
2007/09/27 15:10:33 [debug] 97992#0: *4 post rewrite phase: 3
2007/09/27 15:10:33 [debug] 97992#0: *4 generic phase: 4
2007/09/27 15:10:33 [debug] 97992#0: *4 access phase: 5
2007/09/27 15:10:33 [debug] 97992#0: *4 access phase: 6
2007/09/27 15:10:33 [debug] 97992#0: *4 post access phase: 7
2007/09/27 15:10:33 [debug] 97992#0: *4 content phase: 8
2007/09/27 15:10:33 [debug] 97992#0: *4 content phase: 9
2007/09/27 15:10:33 [debug] 97992#0: *4 content phase: 10
2007/09/27 15:10:33 [debug] 97992#0: *4 content phase: 11
2007/09/27 15:10:33 [debug] 97992#0: *4 http set discard body
2007/09/27 15:10:33 [debug] 97992#0: *4 http filename: "/usr/local/www/nginx/index.html"
2007/09/27 15:10:33 [debug] 97992#0: *4 add cleanup: 080E24C4
2007/09/27 15:10:33 [debug] 97992#0: *4 http static fd: 9
2007/09/27 15:10:33 [debug] 97992#0: *4 HTTP/1.1 200 OK
Server: nginx/0.6.11
Date: Thu, 27 Sep 2007 11:10:33 GMT
Content-Type: text/html
Content-Length: 3
Last-Modified: Sun, 29 Jul 2007 12:14:59 GMT
Connection: keep-alive
Accept-Ranges: bytes


2007/09/27 15:10:33 [debug] 97992#0: *4 write new buf t:1 f:0 080E25C8, pos 080E25C8, size: 214 file: 0, size: 0
2007/09/27 15:10:33 [debug] 97992#0: *4 http write filter: l:0 f:0 s:214
2007/09/27 15:10:33 [debug] 97992#0: *4 http output filter "/index.html?"
2007/09/27 15:10:33 [debug] 97992#0: *4 copy filter: "/index.html?"
2007/09/27 15:10:33 [debug] 97992#0: *4 http postpone filter "/index.html?" BFBFE800
2007/09/27 15:10:33 [debug] 97992#0: *4 http postpone filter out "/index.html?"
2007/09/27 15:10:33 [debug] 97992#0: *4 write old buf t:1 f:0 080E25C8, pos 080E25C8, size: 214 file: 0, size: 0
2007/09/27 15:10:33 [debug] 97992#0: *4 write new buf t:0 f:1 00000000, pos 00000000, size: 0 file: 0, size: 3
2007/09/27 15:10:33 [debug] 97992#0: *4 http write filter: l:1 f:0 s:217
2007/09/27 15:10:33 [debug] 97992#0: *4 http write filter limit 0
2007/09/27 15:10:33 [debug] 97992#0: *4 tcp_nopush
2007/09/27 15:10:33 [debug] 97992#0: *4 sendfile: 0, @0 217:3
2007/09/27 15:10:33 [debug] 97992#0: *4 http write filter 00000000
2007/09/27 15:10:33 [debug] 97992#0: *4 copy filter: 0 "/index.html?"
2007/09/27 15:10:33 [debug] 97992#0: *4 http finalize request: 0, "/index.html?"
2007/09/27 15:10:33 [debug] 97992#0: *4 set http keepalive handler
2007/09/27 15:10:33 [debug] 97992#0: *4 http close request
2007/09/27 15:10:33 [debug] 97992#0: *4 http log handler
2007/09/27 15:10:33 [debug] 97992#0: *4 run cleanup: 080E24D0, fd:9
2007/09/27 15:10:33 [debug] 97992#0: *4 free: 080E2000, unused: 2202
2007/09/27 15:10:33 [debug] 97992#0: *4 event timer add: 6: 5000:1185497876
2007/09/27 15:10:33 [debug] 97992#0: *4 free: 080CE000
2007/09/27 15:10:33 [debug] 97992#0: *4 free: 080D7000
2007/09/27 15:10:33 [debug] 97992#0: *4 hc free: 00000000 0
2007/09/27 15:10:33 [debug] 97992#0: *4 hc busy: 00000000 0
2007/09/27 15:10:33 [debug] 97992#0: *4 tcp_nodelay
2007/09/27 15:10:33 [debug] 97992#0: timer delta: 812
2007/09/27 15:10:33 [debug] 97992#0: posted events 00000000
2007/09/27 15:10:33 [debug] 97992#0: worker cycle
2007/09/27 15:10:33 [debug] 97992#0: kevent timer: 5000, changes: 0
2007/09/27 15:10:38 [debug] 97992#0: kevent events: 0
2007/09/27 15:10:38 [debug] 97992#0: timer delta: 5005
2007/09/27 15:10:38 [debug] 97992#0: *4 event timer del: 6: 1185497876
2007/09/27 15:10:38 [debug] 97992#0: *4 http keepalive handler
2007/09/27 15:10:38 [debug] 97992#0: *4 close http connection: 6
2007/09/27 15:10:38 [debug] 97992#0: *4 free: 00000000
2007/09/27 15:10:38 [debug] 97992#0: *4 free: 00000000
2007/09/27 15:10:38 [debug] 97992#0: *4 free: 080E0100, unused: 64
2007/09/27 15:10:38 [debug] 97992#0: posted events 00000000
2007/09/27 15:10:38 [debug] 97992#0: worker cycle
2007/09/27 15:10:38 [debug] 97992#0: kevent timer: -1, changes: 0


More information about the nginx-ru mailing list