如果启动nginx报错:
正在启动 nginx:Can't locate nginx.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .).
BEGIN failed--compilation aborted.
nginx: [alert] perl_parse() failed: 2
[失败]
这是因为没有make install,导致http_perl_module加载异常,需要将以下文件复制到指定目录
mkdir -p /usr/local/lib64/perl5/auto/nginx
cp objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.bs objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so /usr/local/lib64/perl5/auto/nginx/
cp objs/src/http/modules/perl/blib/lib/nginx.pm /usr/local/lib64/perl5/
然后重新启动nginx