Hello,
I am trying to integrate Nginx with Perl CGI script.
I am following the How-TO
http://blog.oddeven.info/nginx-perl-fastcgi-how-to/
My conf file is conf/nginx.conf
worker_processes 1;
error_log logs/error.log notice;
working_directory /opt/nginx;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 80;
client_max_body_size 100m;
# /cgi-bin configuration
location ~ ^/cgi-bin/.*\.cgi$ {
gzip off;
fastcgi_pass unix:/var/run/nginx/perl_cgi-dispatch.sock;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
include fastcgi_params;
}
}
}
I start fastcgi-wrapper.pl first, then it create perl fastcgi-wrapper.pl
in /var/run/nginx/
I put my cgi file in html/cgi_bin/print.cgi
This cgi file will print out "Hello World!!"
I start nginx, and visit 127/0.0.1/cgi_bin/print.cgi
However, the web browser can not show "Hello World!!", instead, it will
pop a download window, to ask me to download this cgi file.
I am thinking my conf is not correct. Could you help me to solve this
issue?
Thanks,
Yanxin
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx