Welcome! Log In Create A New Profile

Advanced

question about Perl CGI

Yanxin Z.
March 30, 2011 03:22AM
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
Subject Author Posted

question about Perl CGI

Yanxin Z. March 30, 2011 03:22AM

Re: question about Perl CGI

Francis Daly March 30, 2011 09:16AM

Re: question about Perl CGI

Yanxin Z. March 30, 2011 11:48AM

Re: question about Perl CGI

Francis Daly March 30, 2011 12:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 142
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready