/etc/nginx/sites-available/default
Code: Select all
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/localhost.access.log;
location / {
root /var/www;
index index.php index.html index.htm;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}
#pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
include fastcgi_params;
}
Looks OK, right? I then saw that PHP blank pages mean you need to set error reporting = On in php.ini, which is fine except that in /etc/php5, there are this many php.ini files:
Code: Select all
server:/etc/nginx/sites-available# cd /etc/php5
server:/etc/php5# find . -name php.ini
./cli/php.ini
./fpm/php.ini
./apache2filter/php.ini
./cgi/php.ini
./apache2/php.ini
I set display_errors = On in fpm/php.ini, and in cli/php.ini, and in cgi/php.ini. Then I restarted php5-fpm. Still a blank page. Not even a simple <?php phpinfo(); ?> page works. What should I do?