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?
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
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/
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)?
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
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: