LinuxForum.Fans
Тема

Nginx accesskey module

Автор: Oleg_Rodzewich 3 сообщений 912 просмотров
#178735

Модули сборки nginx:
[console]# /opt/nginx/sbin/nginx -V
nginx: nginx version: nginx/1.0.4
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/opt/nginx --http-client-body-temp-path=temp/client_body
--http-proxy-temp-path=temp/proxy --http-fastcgi-temp-path=temp/fastcgi --http-uwsgi-
temp-path=temp/uwsgi --http-scgi-temp-path=temp/scgi --with-http_ssl_module --with-
http_realip_module --with-http_addition_module --with-http_xslt_module --with-
http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module
--with-http_flv_module --with-http_gzip_static_module --with-http_random_index_module --with-
http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-
http_perl_module --with-mail --with-file-aio --with-mail_ssl_module --with-ipv6 --with-ld-opt=-Wl,-E
--add-module=/data/compile/nginx-accesskey-2.0.3[/console]
Перезапускаем nginx:
[console]/opt/nginx/sbin/nginx -s stop -p ~/dev/nginx/
/opt/nginx/sbin/nginx -p ~/dev/nginx/[/console]
Конфигурация сервера содержит следующий локейшен:
[console]location /catalog {
accesskey on;
accesskey_hashmethod md5;
accesskey_arg "key";
accesskey_signature "mypass$remote_addr";
}[/console]
А результат перезапуска выдает следующую ошибку:
[console]nginx: [emerg] unknown directive "accesskey" in /....путь_к_конфигурации...:66[/console]


Подскажите как правильно использовать accesskey?
И как устранить эту ошибку?

#179499

Нет, со сборкой все нормально, я решение уже нашел =)
http://www.lexa.ru/nginx-ru/msg20551.html
Необходимо в конфигурации произвести магическую замену:

text
-HTTP_MODULES="$HTTP_MODULES $HTTP_ACCESSKEY_MODULE"
+HTTP_MODULES="$HTTP_MODULES ngx_http_accesskey_module"

а потом пересобрать nginx
Иначе модуль скомпилируется, а пользоваться им будет нельзя
Классная вещь accesskey - можно раздавать права на скачивание больших статических файлов без порождения php процесса =)

Тема закрыта, всем спасибо!

Войдите или зарегистрируйтесь, чтобы ответить.