Welcome! Log In Create A New Profile

Advanced

Re: Unable to see a php page

Ian Hobson
March 16, 2020 11:14AM
On 15/03/2020 14:00, Francis Daly wrote:
> On Sun, Mar 15, 2020 at 05:19:57PM +0330, Mahmood Naderan wrote:
>
> Hi there,
>
>> I started php-fpm and opened localhost/index.php
>> This time I see the content of index.php as a plain text.
>> I have to do more debugging. Thanks.
>
> That's useful.
>
> I suggest that the first step is to look at the http headers returned
> from your request -- if they include something like "X-Powered-By: php",
> then you can be confident that nginx asked php to process the file (and
> further investigation should be on the php side); if they do not, then
> you should probably check the nginx side (and the error log, possibly
> in debug mode for the test), to see what nginx did with the request that
> involved it *not* making the fastcgi_pass request.
>
> Good luck with it,
>

The thing I notice is that you have two root statements.
You only need the one at the /server level.

Then, if you use the line

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

(That is all on one line).
in the localtion clause, things should work.

--
Ian Hobson


--
This email has been checked for viruses by AVG.
https://www.avg.com

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

Unable to see a php page

Mahmood Naderan March 15, 2020 08:30AM

Re: Unable to see a php page

Francis Daly March 15, 2020 09:24AM

Re: Unable to see a php page

Mahmood Naderan March 15, 2020 09:52AM

Re: Unable to see a php page

Francis Daly March 15, 2020 10:02AM

Re: Unable to see a php page

Ian Hobson March 16, 2020 11:14AM

Re: Unable to see a php page

Mahmood Naderan March 16, 2020 02:12PM

Re: Unable to see a php page

Francis Daly March 20, 2020 05:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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