Welcome! Log In Create A New Profile

Advanced

Re: Why are my CGI scripts not executed like PHP ?

Ralph Seichter
April 06, 2018 03:56PM
On 06.04.18 19:04, Richard Stanway wrote:

> https://www.nginx.com/resources/wiki/start/topics/examples/fcgiwrap/

I altered my setup to use fcgiwrap. Since then, I keep getting "502 Bad
Gateway" errors, with log entries like this:

2018/04/06 21:21:02 [error] 17838#0: *1 upstream prematurely closed
FastCGI stdout while reading response header from upstream, client:
123.234.123.234, server: test.mydomain.tld, request: "GET / HTTP/1.1",
upstream: "fastcgi://unix:/tmp/cgi.sock:", host: "test.mydomain.tld:8443"

I use fcgiwrap 1.1.0 from 2013, which appears to be the latest available
release according to https://github.com/gnosek/fcgiwrap . I tried both
the Perl script at the location you linked and spawn-fcgi 1.6.4 as an
alternative, but the 502 error pops up regardlesss. Permissions for the
socket are as follows:

$ ls -l /tmp/cgi.sock
srwx------ 1 nginx nginx 0 Apr 6 21:48 /tmp/cgi.sock=

Interestingly I found this old message of Richard's:

http://mailman.nginx.org/pipermail/nginx/2014-January/041963.html

Unfortunately no amount of meddling with SCRIPT_FILENAME, including
setting the absolute path to the CGI script, made any difference for me.

I don't know how to debug this further. Development of fcgiwrap seems to
have ended years ago and the project page is no longer connected. I'd be
grateful for more ideas how to solve this puzzle.

-Ralph

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Why are my CGI scripts not executed like PHP ?

Ralph Seichter April 06, 2018 12:04PM

Re: Why are my CGI scripts not executed like PHP ?

Richard Stanway via nginx April 06, 2018 01:06PM

Why are my CGI scripts not executed like PHP ?

Ralph Seichter April 06, 2018 01:28PM

Re: Why are my CGI scripts not executed like PHP ?

Ralph Seichter April 06, 2018 03:56PM

Re: Why are my CGI scripts not executed like PHP ?

Francis Daly April 07, 2018 10:20AM

Re: Why are my CGI scripts not executed like PHP ?

Ralph Seichter April 07, 2018 02:16PM

Re: Why are my CGI scripts not executed like PHP ?

Francis Daly April 09, 2018 04:48AM

Re: Why are my CGI scripts not executed like PHP ?

Aleksandar Lazic April 10, 2018 04:56PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 219
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