nginx配置 php-fpm listen sock 模式
作者:
足迹人生2017 | 来源:发表于
2018-08-15 16:27 被阅读120次server {
listen 80;
server_name xxx.com;
#charset koi8-r;
root /usr/laravel/public;
location / {
try_files $uri $uri/ /index.php?$query_string;
index index.html index.htm index.php;
expires 1h;
add_header Cache-Control max-age=180;
}
location ~ \.php$ {
add_header Cache-Control "no-cache, no-store, max-age=0, must-revalidate";
add_header Pragma no-cache;
fastcgi_pass unix:/var/run/www/php-cgi.sock; # 此处配置自己设置的php-cgi.sock的位置
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
本文标题:nginx配置 php-fpm listen sock 模式
本文链接:https://www.haomeiwen.com/subject/mdpwbftx.html
网友评论