欧美一区2区三区4区公司二百,国产精品婷婷午夜在线观看,自拍偷拍亚洲精品,国产美女诱惑一区二区

歡迎來到云服務器

服務器租用

辦理phpMyAdmin在nginx+php-fpm模式下無法利用的問題

昨天接到一個網友的問題,說yum安裝nginx+php-fpm+mysql+phpMyAdmin后,發明phpMyAdmin無法打開,一直報502錯誤已經抓狂半天了,本著輔佐別人快樂本身的原則,長途幫他看了一下, 現記錄和總結如下,問題辦理思路的總結放在文章最后,問題辦理思路總結也是本文的重點。

問題情況:CentOS6通過yum安裝的nginx+php-fpm+mysql+phpMyAdmin

問題描寫:安裝完成后發明nginx沒有問題,而phpMyAdmin無法打開,提示502錯誤

問題辦理進程

查察問題情況的安裝包:

nginx-filesystem-1.0.15-12.el6.noarch
nginx-1.0.15-12.el6.x86_64
rrdtool-php-1.3.8-7.el6.x86_64
php-pear-1.9.4-4.el6.noarch
php-devel-5.3.3-46.el6_6.x86_64
php-mbstring-5.3.3-46.el6_6.x86_64
php-mcrypt-5.3.3-3.el6.x86_64
php-5.3.3-46.el6_6.x86_64
php-tidy-5.3.3-46.el6_6.x86_64
php-pecl-memcache-3.0.5-4.el6.x86_64
php-xmlrpc-5.3.3-46.el6_6.x86_64
php-xmlseclibs-1.3.1-3.el6.noarch
php-common-5.3.3-46.el6_6.x86_64
php-pdo-5.3.3-46.el6_6.x86_64
php-xml-5.3.3-46.el6_6.x86_64
php-fpm-5.3.3-46.el6_6.x86_64
php-cli-5.3.3-46.el6_6.x86_64
php-mysql-5.3.3-46.el6_6.x86_64
php-eaccelerator-0.9.6.1-1.el6.x86_64
php-gd-5.3.3-46.el6_6.x86_64

按照nginx報的502錯誤,可以劈頭判定是upstream呈現了問題,再提到upstream之前,先列一下nginx的設置文件(去掉注釋,我已經將nginx記錄錯誤日志的級別從默認級別晉升到info)。

user              nginx;
worker_processes  1;
error_log  /var/log/nginx/error.log info;
pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    client_max_body_size 10M;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx/access.log  main;
    sendfile        on;
    keepalive_timeout  65;
    include /etc/nginx/conf.d/*.conf;
}

由于此設置文件中沒有顯式寫明任何server,因此需要查察一下include /etc/nginx/conf.d/*.conf; 所包括的默認server文件,即/etc/nginx/conf.d/default.conf,去掉注釋

cat /etc/nginx/conf.d/default.conf
server {
    listen       80 default_server;
    server_name  _;
    include /etc/nginx/default.d/*.conf;
    location / {
        root   /usr/share/nginx/html;
        index  index.php index.html index.htm;
    }
    error_page  404              /404.html;
    location = /404.html {
        root   /usr/share/nginx/html;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
     location ~ [^/].php(/|$) {
                fastcgi_split_path_info ^(.+?.php)(/.*)$;
                if (!-f $document_root$fastcgi_script_name) {
                        return 404;
                }
                fastcgi_pass 127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi_params;
     }
}

劈頭判定,此nginx的設置確實沒有問題,應該是php-fpm可能php自己的問題(縮小問題范疇)。

查閱nginx日志文件(/var/log/nginx/error.log),發明如下提示,確定是php-fpm的問題,fastcgi也算是對upstream的一種署理

騰訊云代理

Copyright © 2003-2021 MFISP.COM. 國外vps服務器租用 夢飛云服務器租用 版權所有 ? 粵ICP備11019662號

主站蜘蛛池模板: 洛隆县| 大连市| 齐河县| 肥乡县| 光泽县| 伊春市| 庆元县| 顺义区| 鄯善县| 永安市| 宕昌县| 图们市| 临江市| 高州市| 耿马| 扎鲁特旗| 凤冈县| 民丰县| 南皮县| 崇仁县| 晋宁县| 昭苏县| 宕昌县| 买车| 乌拉特前旗| 曲靖市| 大荔县| 马关县| 安宁市| 南江县| 民县| 万盛区| 蒙山县| 泰和县| 曲阳县| 边坝县| 绩溪县| 阿克陶县| 长岛县| 新乐市| 高青县|