# Ngx\_http\_accesskey\_module error

**URL:** <https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986>\
**Category:** NGINX\
**Created:** [October 15, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986 "2008-10-15T16:39:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [October 15, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/1 "2008-10-15T16:39:19Z")

</div>

I follow [http://wiki.codemongers.com/NginxHttpAccessKeyModule#accesskey](http://wiki.codemongers.com/NginxHttpAccessKeyModule#accesskey)  
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?

---

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [October 15, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/2 "2008-10-15T16:45:48Z")

</div>

On Wed, Oct 15, 2008 at 10:33:03PM +0800, lhmwzy wrote:

> I follow [http://wiki.codemongers.com/NginxHttpAccessKeyModule#accesskey](http://wiki.codemongers.com/NginxHttpAccessKeyModule#accesskey)  
> 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.

---

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [October 15, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/3 "2008-10-15T16:54:00Z")

</div>

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](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [October 15, 2008, 6:01pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/4 "2008-10-15T18:01:37Z")

</div>

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](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [October 15, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/5 "2008-10-15T16:59:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [October 15, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/6 "2008-10-15T18:29:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [October 16, 2008, 3:37am UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/7 "2008-10-16T03:37:10Z")

</div>

All you said is right.But nginx can not do the job well.

2008/10/16 Grzegorz N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![lhmwzy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/90db22/32.png) [@lhmwzy](https://www.ruby-forum.com/u/lhmwzy)\
**Post date:** [December 3, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/ngx-http-accesskey-module-error/150986/8 "2008-12-03T21:17:09Z")

</div>

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: [Lexa Software: Nginx-ru@sysoev.ru archive](http://www.lexa.ru/nginx-ru/msg20551.html)
