Membership Membership:
Latest New User Latest: vpros
Past 24 Hours Past 24 Hours: 0
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 137

People Online People Online:
Visitors Visitors: 7
Members Members: 0
Total Total: 7

NakedMCSE Computer Tech Support Forums

So you have passed all of the exams and you are now out in the real world of windows servers, linux servers and freebsd servers faced with a tech support problem you have never seen before...

Find free online tech support in the forums below, respecting that advice is free, but work beyond advice is not...

The General forum is provided for off topic discussion.

You need a user account to post - please Register or Login.

Online Tech Support Forums
 
  Forum  Open Source Tec...  NGINX Server  PERL FastCGI setup with Nginx
Previous Previous
 
Next Next
New Post 12/23/2009 3:44 PM
Informative
  Walker
114 posts
www.lairdscomputer.com
10th Level Poster


PERL FastCGI setup with Nginx 
Modified By Walker  on 12/23/2009 4:50:48 PM)

Prerequisites are that perl and nginx are installed.

First, install FCGI perl module -
1. Go to Cpan.org and search for FCGI
2. Download module archive
3. Extract archive and change to archive directory
4. perl Makefile.pl; make; make test; make install

Then install fast cgi wrapper script - this was created by Denis Filimonov, and is attached to this post.  You need to set this up to run at boot from a non privileged account.

Edit the fast cgi wrapper script to choose either TCP or unix sockets:
sub main {
 #-- use IP sockets
 $socket = FCGI::OpenSocket( "127.0.0.1:8999", 10 );

 #-- use UNIX sockets - user running this script must have
 #-- write access to the '/var/run/nginx' folder!!
 $socket = FCGI::OpenSocket("/var/run/nginx/perl_cgi-dispatch.sock"


Finally edit the nginx configuation to allow for execution of .pl files:
location ~ .*\.pl$ {
            root  /var/wwwroot/;
            include fastcgi_params;
            fastcgi_pass   127.0.0.1:8999;
            fastcgi_index  index.pl;

            fastcgi_param  SCRIPT_FILENAME  /var/wwwroot$fastcgi_script_name;
    }

Restart Nginx to pick up the changes and you should now be able to use .pl perl files.

Walker
www.lairdscomputer.com


Stumble Me Up!
Linux Hosting windows hosting
 
 Login to download attachment
New Post 6/7/2010 12:00 AM
  datakid
1 posts
No Ranking


Re: PERL FastCGI setup with Nginx 

 When you say " Then install fast cgi wrapper script" what do you mean? Where do you put the script?

cheers

 
New Post 6/25/2010 1:09 PM
  Walker
114 posts
www.lairdscomputer.com
10th Level Poster


Re: PERL FastCGI setup with Nginx 

Copy the script into /usr/local/bin or where ever else you keep local scripts.


Stumble Me Up!
Linux Hosting windows hosting
 
New Post 7/23/2014 6:04 AM
  xinyi250
1 posts
No Ranking


Re: PERL FastCGI setup with Nginx 

 thanks          thanks          thanks          thanks          thanks        

 
Previous Previous
 
Next Next
  Forum  Open Source Tec...  NGINX Server  PERL FastCGI setup with Nginx
Send me One Million FREE Guaranteed Visitors