Perl_modules

I compiled nginx with perl ( --with-http_perl_module ),


checking for perl

  • perl version: v5.8.8 built for i386-linux-thread-multi
  • perl interpreter multiplicity found

installed it , and then i get

[root@host nginx-1.2.2]# nginx -t
nginx: [emerg] unknown directive “perl_modules” in
/vps_core/nginx/conf/nginx.conf:9
nginx: configuration file /vps_core/nginx/conf/nginx.conf test failed

[root@host nginx-1.2.2]# nginx -V
nginx version: nginx/1.2.2
configure arguments: --prefix=/vps_core/nginx --with-http_perl_module

Posted at Nginx Forum:

Hello!

On Tue, Jul 24, 2012 at 03:56:32AM -0400, dagr wrote:

[root@host nginx-1.2.2]# nginx -t
nginx: [emerg] unknown directive “perl_modules” in
/vps_core/nginx/conf/nginx.conf:9
nginx: configuration file /vps_core/nginx/conf/nginx.conf test failed

[root@host nginx-1.2.2]# nginx -V
nginx version: nginx/1.2.2
configure arguments: --prefix=/vps_core/nginx --with-http_perl_module

The “perl_modules” directive is only allowed at http level. See
Module ngx_http_perl_module.

Maxim D.

Now i see - its because i placed it on top level - now it works.

But actually this error message should be changed.
When i place directive in wrong place (for example limit_zone inside
location. ) - I used to get messages “this directive is not allowed
here” - not an “uknown directive”.

Posted at Nginx Forum: