Welcome! Log In Create A New Profile

Advanced

Perl + fcgi + nginx - what am I doing wrong?

July 31, 2015 08:55AM
Hi,

I've already got a live + dev site running under nginx and perl (with fcgi), but I can't for the life of me work out why its not working this time around. I've setup a new dev server. I wont bore you with all of the details, but suffice to say I have installed (via apt-get);

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install nginx
sudo apt-get install php5-cli php5-cgi spawn-fcgi php-pear
sudo apt-get install mysql-server php5-mysql
sudo apt-get install fcgiwrap

The OS is Debian 8.1.

I have then configured my site, using:

server {

listen 80;

server_name site.net.net www.site.net.net;
access_log /srv/www/site.net.net/logs/access.log;
error_log /srv/www/site.net.net/logs/error.log;
root /srv/www/site.net.net/www;

location / {
index index.html index.htm;
}

location ~ \.php$ {
try_files $uri =404;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/site.net.net/www$fastcgi_script_name;
}

location ~ \.cgi$ {
try_files $uri =404;
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME /srv/www/site.net.net/www/cgi-bin/$fastcgi_script_name;
}

}

I've sym-linked the config files into sites-enabled, so that its visible on nginx. I then rebooted nginx, and tried:

index.html - works fine
index.php - works fine
index.cgi - 403 error

I managed to fumble my way through it last time, but I can't figure out what I did different (I know it was a real pig to get configured the first time around)

Any suggestions from the experts?

(appologies for the formatting of this post - can't figure out how to do markup?)

TIA

Andy
Subject Author Posted

Perl + fcgi + nginx - what am I doing wrong?

youradds July 31, 2015 08:55AM

Re: Perl + fcgi + nginx - what am I doing wrong?

youradds July 31, 2015 10:55AM

Re: Perl + fcgi + nginx - what am I doing wrong?

Francis Daly July 31, 2015 12:02PM

Re: Perl + fcgi + nginx - what am I doing wrong?

youradds July 31, 2015 01:51PM

Re: Perl + fcgi + nginx - what am I doing wrong?

Erick Ocrospoma July 31, 2015 02:20PM

Re: Perl + fcgi + nginx - what am I doing wrong?

youradds July 31, 2015 02:55PM

Re: Perl + fcgi + nginx - what am I doing wrong?

youradds July 31, 2015 02:59PM

Re: Perl + fcgi + nginx - what am I doing wrong?

Francis Daly July 31, 2015 06:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 260
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready