centos7绯荤粺涓嬪畨瑁卲hp-fpm骞堕厤缃畁ginx鏀寔骞跺紑鍚綉绔檊zip鍘嬬缉

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos7绯荤粺涓嬪畨瑁卲hp-fpm骞堕厤缃畁ginx鏀寔骞跺紑鍚綉绔檊zip鍘嬬缉相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/%e9%bb%98%e8%ae%a4%e7%ab%af%e5%8f%a3' title='榛樿绔彛'>榛樿绔彛   php-fpm   php5   淇敼   bubuko   閰嶇疆nginx   plain   pre   location   

娉細姝ゅ涓嶄粙缁峮ginx鐨勫畨瑁呫€備互涓嬫暀绋嬮粯璁ゅ凡瀹夎nginx銆?/p>

1.

yum install -y php-fpm
yum install php-pdo yum install php-mysql

yum瀹夎榛樿鐗堟湰鏄痯hp5.4,瑕佷娇鐢ㄦ洿楂樼増鏈彲浣跨敤yum search all php-fpm瀹夎鑷繁闇€瑕佺殑鐗堟湰.

2.

鍚姩php-fpm锛堟敞锛歱hp-fpm榛樿绔彛9000锛?/p>

systemctl start php-fpm

3.

閰嶇疆nginx浣挎敮鎸乸hp-fpm骞跺紑濮嬬綉绔檊zip鍘嬬缉锛屼慨鏀筺ginx.cong锛?/p>

鎶€鏈垎浜浘鐗? src=

鍏蜂綋濡備笅锛?/p>

    # 寮€鍚痝zip鍘嬬缉
    gzip on;
    gzip_min_length 1k;
    gzip_buffers 4 16k;
    # gzip_http_version 1.0;
    gzip_comp_level 2;
    gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
    gzip_vary off;
    gzip_disable "MSIE [1-6]."; 
        location / {
            root   /var/www/html;
            index  index.php index.html index.htm;
        }
        #姝ら厤缃娇nginx鏀寔php
        location ~ .php$ {
            root /var/www/html; #鎸囧畾php鐨勬牴鐩綍
            fastcgi_pass 127.0.0.1:9000;#php-fpm鐨勯粯璁ょ鍙f槸9000
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }

鐒跺悗閲嶅惎nginx鍗冲彲锛?span style="color: #ff0000">娉細php-fpm榛樿鏍圭洰褰曚负锛?var/www/html

鐪嬩釜灏忕數褰辨斁鏉句笅蹇冩儏 go go go tova.cc

以上是关于centos7绯荤粺涓嬪畨瑁卲hp-fpm骞堕厤缃畁ginx鏀寔骞跺紑鍚綉绔檊zip鍘嬬缉的主要内容,如果未能解决你的问题,请参考以下文章

Centos7瀹夎骞堕厤缃畆edis

centos 涓婂浣曞畨瑁卲ython3

linux涓嬪畨瑁卹edis

kail涓嬪畨瑁匯saCtfTool

linux涓嬪畨瑁卪ysql

Linux涓嬪畨瑁匱omcat