Welcome! Log In Create A New Profile

Advanced

Error: unknown directive "perl_modules" in /usr/local/nginx/conf/nginx.conf

Posted by designsimply 
Error: unknown directive "perl_modules" in /usr/local/nginx/conf/nginx.conf
December 12, 2011 10:51AM
I'm trying to test the example module to resize images posted at http://wiki.nginx.org/EmbeddedPerlImageResize

I see this error after re-compiling nginx with Embedded Perl support, adding the nginx.conf example from http://wiki.nginx.org/EmbeddedPerlImageResize and restarting nginx with sudo nginx -reload:

2011/12/12 10:23:58 [notice] 16330#0: signal process started
2011/12/12 10:23:58 [emerg] 2993#0: unknown directive "perl_modules" in /usr/local/nginx/conf/nginx.conf

The directive is listed here: http://wiki.nginx.org/EmbeddedPerlModule#perl_modules

Some background:

I'm using OS X Lion 10.7.2, and I installed perl with MacPorts:

$ perl -v
This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-multi-2level

I installed nginx from source using --with-http_perl_module

$ nginx -V
nginx: nginx version: nginx/1.0.10
nginx: built by gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
nginx: configure arguments: --with-http_stub_status_module --with-http_perl_module --sbin-path=/usr/local/sbin/nginx --add-module=../nginx_auth_mysql/

After updating my nginx.conf and adding in the example from http://wiki.nginx.org/EmbeddedPerlImageResize testing the nginx conf seems fine:

$ sudo nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful

I'm not sure where to go from here. Did my nginx re-compile --with-http_perl_module not work since the error says unknown directive "perl_modules"?
Re: Error: unknown directive "perl_modules" in /usr/local/nginx/conf/nginx.conf
January 08, 2012 03:31PM
I got around the 'unknown directive "perl_modules"' problem by completely re-installing nginx. I'm not sure why it wasn't working before.

I'm still having trouble getting the example from http://wiki.nginx.org/EmbeddedPerlImageResize to work.

If I test with a basic perl script, modifying and writing resized images to disk works fine. But if I try sending them through the handler via nginx, I get errors like this:

2012/01/08 14:03:00 [notice] 38367#0: *38 "^(.*)(.jpg|.JPG|.gif|.GIF|.png|.PNG)$" matches "/IMAG5918.resize_to.200x200.jpg", client: 127.0.0.1, server: localhost, request: "GET /IMAG5918.resize_to.200x200.jpg HTTP/1.1", host: "localhost"
2012/01/08 14:03:00 [notice] 38367#0: *38 rewritten data: "/resize/IMAG5918.resize_to.200x200.jpg", args: "", client: 127.0.0.1, server: localhost, request: "GET /IMAG5918.resize_to.200x200.jpg HTTP/1.1", host: "localhost"
2012/01/08 14:03:00 [alert] 38006#0: worker process 38367 exited on signal 11

Background:

$ nginx -V
nginx version: nginx/1.0.11
built by gcc 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
configure arguments: --sbin-path=/usr/local/sbin/nginx --with-http_stub_status_module --with-http_perl_module --add-module=../nginx_auth_mysql/

$ perl -v
This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-multi-2level
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready