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>
鍏蜂綋濡備笅锛?/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鍘嬬缉的主要内容,如果未能解决你的问题,请参考以下文章