0

I upgrade my ubuntu server from 14.04 to 16.04. A few of the packages like:

  • php
  • nginx
  • mysql

were updated, I have a small site running on there which was working fine. I was first receiving a 502, which has been corrected as php5 was removed and php-fpm is now php7.0-fpm.

However all I see now is a blank page. I have looked at the nginx error logs but there is nothing to indicate an error. Nor is there an error in the php7.0-fpm log.

I added a test.php to echo a simple value out but that also shows a blank page. It looks like php is not being invoked.

I have updated the /etc/php/7.0/fpm/poo.d/www.conf to listen on: localhost:9000 The nginx config for my site has not changed.

Any thoughts on where it maybe going awry?

Edit 1:

Enabled access logs via /etc/php7/fpm/pool.d/www.conf and can see requests are being sent to fpm:

127.0.0.1 -  15/Jan/2017:14:38:53 +0000 "- " 200
127.0.0.1 -  15/Jan/2017:14:39:13 +0000 "- " 200
127.0.0.1 -  15/Jan/2017:14:39:27 +0000 "- " 200

Edit 2:

Running:

php index.php

Does render the site from the terminal. So it is not a php incompatibility issue

user3465651
  • 101
  • 1

1 Answers1

0

Found the issue. Not sure what version of nginx was previously installed, but I had the following in my /etc/nginx/sites-enabled/wordpress server:

location ~ [^/]\.php(/|$) {
       fastcgi_split_path_info ^(.+\.php)(/.+)$;
       fastcgi_pass localhost:9000;
       fastcgi_index index.php;
       include fastcgi_params;
       fastcgi_read_timeout 300;
       fastcgi_buffer_size 128k;
       fastcgi_buffers 256 16k;
       fastcgi_busy_buffers_size 256k;
       fastcgi_temp_file_write_size 256k;
}

And changed to:

location ~ \.php$ {
    include snippets/fastcgi-php.conf;

    # With php7.0-cgi alone:
    fastcgi_pass 127.0.0.1:9000;
}

Wordpress now rendering

user3465651
  • 101
  • 1