When I load in my browser myserver.es/apc.php the password for
Restricted is requestes, so I introduce it. But then the browser does
not load php, it shows the php in the browser. If I open
myserver.es/index.php it’s loaded properly, as other php files in my
directory.
I know this is old, but for those still finding this in search engines,
thats not the ‘correct’ fix, though it could work, The problem us using
a root path inside of the location block, if you move the root outside
of location and into the server { } block, then there is no need to have
a duplicated nested php block, nor is there a need to manually define
the document root since $document_root would be correctly filled by that
point.
#if the line isn't already in fastcgi_params
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /usr/local/nginx/conf/fastcgi_params;
}
}
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.