5

I'm on Linux Mint LMDE. I just receive a upgrade of nginx from 1.6.3 to 1.8.0 with aptitude and now, I got blank page on all my websites

Here my configuration :

    server {
        listen 80;

        root /var/www/phpmyadmin;
        index index.php;

        server_name phpmyadmin.loc;

        location / {
                try_files $uri $uri/ =404;
        }

        location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                include fastcgi_params;
        }

        location ~ /\.ht {
                deny all;
        }
}

It's a basic configuration for phpmyadmin...

I got access log when I go to my index.

127.0.0.1 - - [07/May/2015:11:53:51 +0200] "GET / HTTP/1.1" 200 31 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36"

But no error log, and blank page

Anyone could help me ?

  • Did you get an answer that fixed this? I am in the same soup. With "yum update", I'm at 1.8.0 but the old setup doesn't work now. All the suggestions in this thread do not work. Any ideas? – PKHunter Feb 9 '16 at 14:54
7

I was having the same issue. It turned out the the problem was caused by SCRIPT_FILENAME fcgi param. When I added it to virtual host config everything started working:

location ~ \.php$ {
    include fastcgi_params;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
  • 5
    Or even batter solve the problem once and for all by editing /etc/nginx/fastcgi_params and adding this line at the top: fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; – Michał Durys May 7 '15 at 13:06
4

replace

include fastcgi_params;

with

include fastcgi.conf;

and remove fastcgi_param SCRIPT_FILENAME ... in nginx.conf

  • Doesn't work. This is what I have - URL of the code snippet is: pasted.co/dca1e3e4 -- as this comment screws up formatting. location ~ \.php$ { try_files $uri =404; fastcgi_index index.php; #include fastcgi_params; #fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; include fastcgi.conf; fastcgi_pass 127.0.0.1:9000; } – PKHunter Feb 9 '16 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.