Welcome! Log In Create A New Profile

Advanced

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

Erick Ocrospoma
July 31, 2015 02:20PM
Hi,

On 31 July 2015 at 07:55, youradds <nginx-forum@nginx.us> wrote:

> 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;
> }
>

AFAIK, path before $fastcgi_script_name should not end with /

Log didn't say anything in particular? error 403 where comes? 403 means
forbidden, perhaps socket which your are running has not been started with
same permissions as Nginx does/can.

Running fcgi manually through that socket could bring you more clues about
whats happening/wrong with the communication between Nginx and fcgi


> }
>
> 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
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,260678,260678#msg-260678
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



--



~ Happy install !





Erick.

---

IRC : zerick
Blog : http://zerick.me
About : http://about.me/zerick
Linux User ID : 549567
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 240
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