Adding a module, config variables unknown

Hi everybody,
I have a problem adding a module.

I’ve downloaded and extracted the nginx sources.
~/devel/nginx/

Downloaded the sources of the module called “accesskey”.
Extracted the files to a folder let’s call it ~/devel/ngx_accesskey/src/

cd ~/devel/nginx
./configure --add-module=~/devel/ngx_accesskey/src/
make
make install

Added “accesskey on” to the config (in a location) and started nginx
I get:
2008/08/20 13:18:05 [emerg] 32055#0: unknown directive “accesskey” in
/usr/local/nginx/conf/nginx.conf:47

What did I do wrong?
The object seems to be built and linked to the binary.

I have the same problem with a module I’ve started to write myself.

Thanks everybody!

Bjoern <[email protected]…> writes:

Hi everybody,
I have a problem adding a module.

As a addition: http://wiki.codemongers.com/NginxHttpAccessKeyModule

“Bjoern” [email protected] wrote:

./configure --add-module=~/devel/ngx_accesskey/src/
^^^^^^^^^^^^^^^^^^^^^^^^^^
Tilde (~) is not going to be expanded here. Use full path.

It will, tilde is expanded by shell. Anyway - I experience the same
problem, however i used full path – ./configure
–add-module=/tmp/nginx-accesskey/

Hi,
sorry… That was just the example…
I used the absolute path of course…
/home/myuser/data/development/workspace/ngx_accesskey/src/ to be exact.

Unfortunately, that’s not the problem.

Thanks,
Bjoern

“Bjoern” [email protected] wrote:

I don’t know why the absolute path doesn’t work. The oddest thing is,
that everything gets compiled perfectly well and that the binary
contains strings containing ‘ngx_mymodule’, so it’s in there.
I’m not sure, why the path is relevant after the compile process
succeeded… but it seems to be. Can anybody explain this to me, please?
Or am I just misinterpreting anything?

What is the output of configure and make in all cases?

Hi,
it seems the absolute path was the problem.
My solution is this:
cd ~/devel/nginx
mkdir src/addons
ln -s /home/myuser/data/development/workspace/ngx_mymodule/src/
src/addons/ngx_mymodule
./configure --add-module=src/addons/ngx_mymodule
make
make install

I don’t know why the absolute path doesn’t work. The oddest thing is,
that everything gets compiled perfectly well and that the binary
contains strings containing ‘ngx_mymodule’, so it’s in there.
I’m not sure, why the path is relevant after the compile process
succeeded… but it seems to be. Can anybody explain this to me, please?
Or am I just misinterpreting anything?

Thanks,
Bjoern

I find that using ~ does not work, it doesn’t get expanded by the
shell (which seems unusual), but absolute path works fine. This is on
Mac OS X, so YMMV.

On Thu, Aug 21, 2008 at 05:07:41PM +0200, Bjoern wrote:

I don’t know why the absolute path doesn’t work. The oddest thing is,
that everything gets compiled perfectly well and that the binary
contains strings containing ‘ngx_mymodule’, so it’s in there.
I’m not sure, why the path is relevant after the compile process
succeeded… but it seems to be. Can anybody explain this to me, please?
Or am I just misinterpreting anything?

I commonly use
–add-module=…/…/src/addon/module

and did not tried aboslute path, I will look.

I’ve tried some of the suggestions but still getting
the same error

here’s snip of my config

location /videos {
accesskey on;
accesskey_hashmethod md5;
accesskey_arg “key”;
accesskey_signature “myPass$remote_addr”;

[[email protected] /usr/local/chtest]# ./sbin/nginx -t -c conf/nginx.conf
2008/08/26 14:58:28 [emerg] 25808#0: unknown directive “accesskey” in
conf/nginx.conf:53
2008/08/26 14:58:28 [emerg] 25808#0: the configuration file
conf/nginx.conf
test failed
[[email protected] /usr/local/chtest]# vi conf/nginx.conf

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs