fastcgi_param SCRIPT_FILENAME - not config seems to work

truffle nginx-forum at
Wed Apr 21 12:39:22 UTC 2021

Sorry for this noob question, but frustration is eating me.
I'm trying to set up my php app for 2 straight days, and no config seems to
work to load it properly.

My config:

server {

    fastcgi_param HTTPS on;

    location /app  {
        index index.php;
		alias /var/www/app;

		location ~ \.php$ {
		    try_files $uri =404;
		    include /etc/nginx/fastcgi_params;
	        include /etc/nginx/fastcgi.conf;

	        fastcgi_index index.php;
		    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		    fastcgi_pass unix:/var/run/nginx/php-fastcgi.sock;

But I also tried a number of other placement and combinations.

This will result (probably obviously) in a "No input file specified."
SCRIPT_FILENAME will never be taken unless I change it explicitly to
/var/www/app/index.php (and in that case only that file loads, 404ing all
other php files out).

What could be the issue? Where could I even debug this? (in terms of what
file nginx is trying to feed php-fpm)

Posted at Nginx Forum:,291334,291334#msg-291334

More information about the nginx mailing list