Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ubuntu 16.04,nginx,phpmyadmin-502坏网关_Php_Nginx_Phpmyadmin - Fatal编程技术网

Ubuntu 16.04,nginx,phpmyadmin-502坏网关

Ubuntu 16.04,nginx,phpmyadmin-502坏网关,php,nginx,phpmyadmin,Php,Nginx,Phpmyadmin,我将此设置用于nginx(默认文件): 当我尝试访问30425时,我得到了502坏网关。所有其他设置都是默认设置(PHP7)。我不得不替换这个fastcgi_pass 127.0.0.1:9000 要快速通过unix:/var/run/php/php7.3-fpm.sock; 然后它就完美地工作了 完整代码 server{ listen 80; index index.html index.htm index.php; server_name 127.0.0.1;

我将此设置用于nginx(默认文件):


当我尝试访问30425时,我得到了502坏网关。所有其他设置都是默认设置(PHP7)。

我不得不替换这个fastcgi_pass 127.0.0.1:9000
要快速通过unix:/var/run/php/php7.3-fpm.sock; 然后它就完美地工作了

完整代码

server{
    listen 80;
    index index.html index.htm index.php;

    server_name 127.0.0.1;

    root /usr/share/phpmyadmin;
    location / {
            #try_files $uri $uri/ = 404;
            autoindex on;
    }


    location ~\.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+);
            try_files $uri $uri/ =404;
            fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_na$
            fastcgi_param SERVER_NAME $http_host;
            fastcgi_ignore_client_abort on;
    }

}

所以打开日志并阅读它们。看看这个。。。与您的情况相同,从PHP7.3迁移到7.4,但没有更改fastscgi_-pass版本。非常感谢。
server{
    listen 80;
    index index.html index.htm index.php;

    server_name 127.0.0.1;

    root /usr/share/phpmyadmin;
    location / {
            #try_files $uri $uri/ = 404;
            autoindex on;
    }


    location ~\.php$ {
            fastcgi_split_path_info ^(.+\.php)(/.+);
            try_files $uri $uri/ =404;
            fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
            fastcgi_index index.php;
            include fastcgi_params;
            fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_na$
            fastcgi_param SERVER_NAME $http_host;
            fastcgi_ignore_client_abort on;
    }