• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

/admin.php not working after nginx upgrade 1.8 to 1.9

Mouth

Well-known member
#1
I have Debian Jessie with nginx and php5-fpm, and have upgraded nginx 1.8 (dotdeb) to 1.9 (nginx.org). After doing so, /admin.php is no longer working instead just returning an empty page.

Fairly sure it's to do with fastcgi(_params|.conf), but cannot put my finger on the issue.

php5-fpm processing is (and hasn't changed between nginx 1.8 to1.9 upgrade) ...
Code:
    # pass the PHP scripts to FastCGI server
    #
    location ~ [^/]\.php(/|$) {
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        if (!-f $document_root$fastcgi_script_name) {
                return 404;
        }
        fastcgi_pass unix:/run/php5-fpm.sock;
        include /etc/nginx/fastcgi.conf;
    }
and fastcgi.conf is (was using fastcgi_params with nginx 1.8) ...
Code:
fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  HTTPS              $https if_not_empty;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;
Feedback/pointers appreciated.
 

rainmotorsports

Well-known member
#2
Im guessing you went from a prebuilt to self compiled nginx? Will be interested in learning what the problem is. But I haven't had an issue with nginx 1.9.9/php-fpm clean install or upgrade. But I also never used packages and use a particular set of instructions for compiling nginx. So setups always differ a little when i try to trouble shoot my problems, etc.
 

Mouth

Well-known member
#4
Dohl! Administrator error :)
I failed to remember that my site nginx config had an override php processing for /admin.php and it was still using fastcgi_params instead of fastcgi.conf
All fixed now.