php-fpm使用sock方式配置

咱們大部分默認的nginx鏈接方式爲php-cgi監聽127.0.0.1:9000的方式,剛剛測試了使用socket方式鏈接,速度飛快啊!php

nginx配置方法:html

location ~ \.php$ {nginx

 fastcgi_pass unix:/dev/shm/php-fpm.sock;
 
 fastcgi_index index.php;
 
 fastcgi_param SCRIPT_FILENAME /opt/www_data/code/public_html$fastcgi_script_name;
 
 include fastcgi_params;
 
 }
 socket

相關文章
相關標籤/搜索