nginx_webdav
nginxを WebDAVサーバとして利用する方法
Phase-Deploy 概要Version: 0.02, November 29, 2009 Author: Mazursky Mikhail (ash2kk at gmail dot com) nginxについての英語の説明: http://nginx.org/ ロシアンであれば: http://sysoev.ru/nginx/ nginx 設定ファイル - GET リクエストのためのポートの分割server { # port to listen on for GET requests. 特定のipにbind()することができます # listen 123.123.123.123:80, また、幾つかの"listen"行を指定することができます。 listen 80; # access log が要らなければ、これをコメントにします access_log /var/log/nginx.access.log; # エラーを記録する場所 error_log /var/log/nginx.error.log warn; location / { # MogileFSファイルのルートパス root /var/mogdata; # HTTPヘッダの有効期間を追加する。Usefull if you serve static content that don't # change over time and have permanent links (image sharing service for # example) expires max; } } server { listen 7500; error_log /var/log/nginx.error.log crit; location / { # this line is very important - you will get errors if you miss it autoindex on; root /var/mogdata; } # a location directive per device. you need this to make nginx store temporary # file on the same device where the upload will be stored location /dev101/ { root /var/mogdata; # maximum upload size client_max_body_size 20m; # this needs to be on the same device with '/var/mogdata/dev101' so nginx # can move uploaded file instantly client_body_temp_path /var/mogdata/dev101/temp; # MogileFS uses only this WebDAV methods dav_methods PUT DELETE; create_full_put_path on; dav_access user:rw group:r all:r; # Non-GET requests are allowed only for 192.168.0.0/16 limit_except GET { allow 192.168.0.0/16; deny all; } } location /dev102/ { root /var/mogdata; client_max_body_size 20m; client_body_temp_path /var/mogdata/dev102/temp; dav_methods PUT DELETE; create_full_put_path on; dav_access user:rw group:r all:r; limit_except GET { allow 192.168.0.0/16; deny all; } } } nginx 設定ファイル - GETとWebDAVのための一つのポート番号server { listen 7500; error_log /var/log/nginx.error.log crit; location / { autoindex on; root /var/mogdata; } location /dev101/ { expires max; root /var/mogdata; client_max_body_size 20m; client_body_temp_path /var/mogdata/dev101/temp; dav_methods PUT DELETE; create_full_put_path on; dav_access user:rw group:r all:r; limit_except GET { allow 192.168.0.0/16; deny all; } } location /dev102/ { expires max; root /var/mogdata; client_max_body_size 20m; client_body_temp_path /var/mogdata/dev102/temp; dav_methods PUT DELETE; create_full_put_path on; dav_access user:rw group:r all:r; limit_except GET { allow 192.168.0.0/16; deny all; } } } |
► Sign in to add a comment
この設定は完全なwebdavサポートのために動きますか?OPTIONSとPROPFINDも必要ですか?
webdavのようにしなくてもよい、GET/PUT/DELETEだけです。