Nginx mogilefs module (v 1.0.2) |
rus eng |
MogileFS client for nginx web server.
The module queries MogileFS tracker specified by mogilefs_tracker directive and uses first path returned by tracker to fetch requested file. The file key is specified by mogilefs_pass directive. If no domain or no file with specified key is found by tracker "404 Not found" status is retuned. If file is found but zero paths are returned by tracker "403 Service unavailable" status is retuned.
Specifies key of the file to query from MogileFS tracker. The key can contain any variables. If key is omitted, the part of request URI will be uses as key, which remains after stripping the name of mathced location.
location /download/ { mogilefs_pass { [...] } }
In this example if request URI is /download/example.jpg, the tracker will be queried for file with the key example.jpg.
The fetch block contains configuration which will be used to fetch file from storage node. In this block it is necessary to use proxy_pass directive with $mogilefs_path as an argument. Example:
mogilefs_pass { proxy_pass $mogilefs_path; proxy_hide_header Content-Type; proxy_buffering off; }
The variable $mogilefs_path contains absolute URL to the file on storage node. The fetch block creates a hidden internal location with the name /mogilefs_fetch_XXXXXXXX, where redirected will be performed after successful tracker response.
Specifies which methods will be allowed to access MogileFS. GET retrieves a resource from MogileFS, PUT creates or replaces, DELETE deletes a resource in MogileFS.
Specifies the name of MogileFS domain to query. The specification may contain variables.
Specifies address of MogileFS tracker to query.
Enables sending of noverify argument to MogileFS.
Specifies a timeout to be used to connect to mogilefs tracker. Could not be longer than 75 seconds.
Specifies a timeout to be used to send data to mogilefs tracker. If no data will be received by mogilefs tracker during this time interval, nginx will close the connection.
Specifies a timeout to be used to receive data from mogilefs tracker. If no data will be send by mogilefs tracker during this time interval, nginx will close the connection.
error_log logs/error.log notice; working_directory /usr/local/nginx; http { include mime.types; default_type application/octet-stream; server { listen 80; location /download/ { # # Query tracker at 192.168.2.2 for a file with the key # equal to remaining part of request URI # mogilefs_tracker 192.168.2.2; mogilefs_pass { proxy_pass $mogilefs_path; proxy_hide_header Content-Type; proxy_buffering off; } } } }
nginx 0.7.1 or above is required to compile this module.
Latest version 1.0.2:
File | MD5 | SHA1 |
nginx_mogilefs_module-1.0.2.tar.gz | c45947ec9aebe83398d4c9604e843023 | 15e4e8ed3a27c0ac2bd01796166e0ea33d787e48 |
nginx_mogilefs_module-1.0.2.zip | 6dcd471424c4d98d94220297931e5273 | 263d5fe6c13c8e4650f8fe5d035dc985f6da4121 |
http://github.com/vkholodkov/nginx-mogilefs-module/tree/master
Download sources from one of the links above. Unpack the archive:
tar xvzf nginx_mogilefs_module-1.0.2.tar.gz
Configure nginx with additional module:
cd <path to nginx sources> ./configure --add-module=<path to mogilefs module sources> make make install
nginx -- is a web-server, developed by Igor Sysoev.
The licence of above-described module is BSD You should have received a copy of licence along with the source code.
Valery Kholodkov valery+nginx@grid.net.ru
Please use address extension while composing an Email to me.
Copyright (C) 2009 Valery Kholodkov