在我的Mac OSX 10.7.4與Perlbrew的Perl的5.16.0我有這個nginx.conf:nginx的與http_perl_module不執行Perl腳本只是下載它們
server {
listen 1234;
server_name MyPHPPerlServer;
root "/Library/WebServer/servdir";
location/{
fancyindex on;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ \.pl$ {
try_files $uri =404;
gzip off;
#fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.pl;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
對於這個配置來運行PHP腳本,我編譯並運行php-fpm
,現在它運行PHP很好。
要運行Perl腳本,我 ./configure --add-module=../ngx-fancyindex --with-http_perl_module
nginx的編譯和運行Nginx的罰款與此配置,但是當我瀏覽到http://localhost:1234/index.pl
它不執行Perl腳本,它只是下載它。
作爲一個支票,我關閉了nginx並啓動了Apache,啓動了Apache,並啓動了Apache,並且它完全運行了index.pl。
我應該怎麼做才能讓nginx運行Perl腳本?謝謝。
你不使用任何http_perl_module功能? – ikegami