After install Moodle, nginx, php-fpm blank page

After install Moodle, nginx, php-fpm blank page

by Pál Csányi -
Number of replies: 3

Hi,

I just installed on my Raspberry Pi 2 Model the Moodle with Nginx and php-fpm.

But, when I want to open my site http://www.cspl.hu/moodle in the browser I get blank page only.

Where to start searching for the bug?

Best, Pali

Average of ratings: -
In reply to Pál Csányi

Tárgy: After install Moodle, nginx, php-fpm blank page

by Pál Csányi -

I see that that PHP does not work, just do not know why?

In reply to Pál Csányi

Tárgy: After install Moodle, nginx, php-fpm blank page

by Pál Csányi -

As I sayed, PHP does not worked.

I found in /var/log/nginx/localhost.error_log this:

1 connect() to unix:/var/run/php-fpm/php-fpm.sock failed (2: No such file or
 directory) while connecting to upstream, client: 192.168.50.163, server: cspl.hu, request: "GET /index.php HTTP/ 1.1", upstream: "fastcgi://unix:/var/run/php-fpm/php-fpm.sock:", host: "www.cspl.hu"

So, what I did are followings.

1. uninstall moodle.

2. set properly nginx and php ( with fastcgi support )

2.1. set properly permission of files: Moodledata directory: /var/www/localhost/moodle/

       chmod 02777 /var/www/localhost/moodle
       chown -R nginx:nginx /var/www/localhost/moodle

2.2. set properly php-fpm

       nano /etc/php/fpm-php5.6/php-fpm.conf
       listen = /run/php-fpm/php-fpm.socket
       listen.owner = nginx
       security.limit_extensions = .php .php3 .php4 .php5

3. try this setup out with index.php file that contains only this line: <?php phpinfo(); ?>

After this probe when I see that it works, did moodle install again.

Moodle works now here.

In reply to Pál Csányi

Re: After install Moodle, nginx, php-fpm blank page

by Matteo Scaramuccia -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Pál,
thanks for sharing how you did it Yes approve.

For community reference: nginx and Moodle are "shortly" documented here to provide a way to support the so called Moodle Slash arguments: https://docs.moodle.org/30/en/Nginx.

It is worth to mention an interesting Raspberry Pi 2 related ref too: https://moopi.uk/.

HTH,
Matteo