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

歡迎來到云服務(wù)器

服務(wù)器租用

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

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

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

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

問題辦理進(jìn)程

查察問題情況的安裝包:

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呈現(xiàn)了問題,再提到upstream之前,先列一下nginx的設(shè)置文件(去掉注釋,我已經(jīng)將nginx記錄錯誤日志的級別從默認(rèn)級別晉升到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;
}

由于此設(shè)置文件中沒有顯式寫明任何server,因此需要查察一下include /etc/nginx/conf.d/*.conf; 所包括的默認(rèn)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的設(shè)置確實沒有問題,應(yīng)該是php-fpm可能php自己的問題(縮小問題范疇)。

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

騰訊云代理

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

主站蜘蛛池模板: 铅山县| 汽车| 高州市| 固始县| 九江县| 西充县| 仙桃市| 攀枝花市| 东明县| 湘阴县| 视频| 文山县| 资中县| 宁蒗| 宁南县| 读书| 鸡泽县| 威远县| 裕民县| 凤城市| 弋阳县| 固始县| 南木林县| 枣强县| 利辛县| 惠东县| 会同县| 开化县| 定南县| 义马市| 上思县| 金寨县| 大庆市| 石景山区| 乾安县| 崇文区| 温泉县| 广水市| 滁州市| 黄龙县| 沂源县|