Forum: NGINX ngx_http_accesskey_module error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
lhmwzy (Guest)
on 2008-10-15 18:39
(Received via mailing list)
I follow http://wiki.codemongers.com/NginxHttpAccessKeyModu...
to install the ngx_http_accesskey_module,but get an error:

2008/10/15 22:48:56 [emerg] 31870#0: unknown directive "accesskey" in
/usr/local/nginx/conf/nginx.conf71

What's the problem?
Grzegorz N. (Guest)
on 2008-10-15 18:45
(Received via mailing list)
On Wed, Oct 15, 2008 at 10:33:03PM +0800, lhmwzy wrote:
> I follow http://wiki.codemongers.com/NginxHttpAccessKeyModu...
> to install the ngx_http_accesskey_module,but get an error:
>
> 2008/10/15 22:48:56 [emerg] 31870#0: unknown directive "accesskey" in
> /usr/local/nginx/conf/nginx.conf71
>
> What's the problem?

You're not running a binary with accesskey compiled in.
Have you recompiled Nginx after configuring the module?
Installed the newly compiled version?
Restarted/upgraded the binary?

Best regards,
 Grzegorz N.
lhmwzy (Guest)
on 2008-10-15 18:54
(Received via mailing list)
I download the file nginx-accesskey-2.0.3.tar.gz and untar  and put it
in $nginxsrchome/src/addons
then run:
1../configure --user=www --group=www --prefix=/usr/local/nginx
--with-http_stub_status_module --with-http_ssl_module --with-md5=/usr
--with-http_gzip_static_module  --with-http_realip_module
--with-poll_module --add-module=src/addons/nginx-accesskey-2.0.3/
2.make
3.make install
4.kill the old nginx pid and run the new nginx

Any thing is wrong?

2008/10/15 Grzegorz N. <removed_email_address@domain.invalid>:
Grzegorz N. (Guest)
on 2008-10-15 18:59
(Received via mailing list)
On Wed, Oct 15, 2008 at 10:47:24PM +0800, lhmwzy wrote:
>
> Any thing is wrong?

Looks OK to me, but there was a thread some time ago about Nginx not
liking relative paths to addon modules (IIRC), so you might try using
the full path, e.g. --add-module=$PWD/src/addons/nginx-accesskey-2.0.3/

Save the output of configure somewhere, do you see a message about
configuring the accesskey module?

Just in case, does the following command output anything (while you are
in the Nginx source directory where you compiled it)?

strings objs/nginx | grep accesskey_signature

Best regards,
 Grzegorz N.
lhmwzy (Guest)
on 2008-10-15 20:01
(Received via mailing list)
Use the full path
./configure --user=www --group=www --prefix=/usr/local/nginx
--with-http_stub_status_module --with-http_ssl_module --with-md5=/usr
--with-http_gzip_static_module  --with-http_realip_module
--with-poll_module
--add-module=/root/src/nginx-0.7.18/src/addons/nginx-accesskey-2.0.3/

strings objs/nginx | grep accesskey_signature outputs:
accesskey_signature

But the error is the same:
2008/10/16 00:11:58 [emerg] 7566#0: unknown directive "accesskey" in
/usr/local/nginx/conf/nginx.conf:70


2008/10/15 Grzegorz N. <removed_email_address@domain.invalid>:
Grzegorz N. (Guest)
on 2008-10-15 20:29
(Received via mailing list)
On śro, paź 15, 2008 at 11:54:16 +0800, lhmwzy wrote:
> But the error is the same:
> 2008/10/16 00:11:58 [emerg] 7566#0: unknown directive "accesskey" in
> /usr/local/nginx/conf/nginx.conf:70

So it looks like the binary is compiled with the module.

Make sure you ran make install successfully (you may need root
privileges), compare the binaries (objs/nginx and
/wherever/you/installed/nginx) using e.g. md5sum and if they match,
restart Nginx. Make sure the pid changed :)

Best regards,
 Grzegorz N.
lhmwzy (Guest)
on 2008-10-16 05:37
(Received via mailing list)
All you said is right.But nginx can not do the job well.

2008/10/16 Grzegorz N. <removed_email_address@domain.invalid>:
Alex L. (Guest)
on 2008-12-03 22:17
I ran into the same issue with nginx-0.7.24 and accesskey-2.0.3. Found a
Russian post and the solution is modify the "config" file of accesskey
as following:


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

refer: http://www.lexa.ru/nginx-ru/msg20551.html
This topic is locked and can not be replied to.