标签:
#nginx 开启目录浏览
location / {
root /data/www/file //指定实际目录绝对路径;
autoindex on; //开启目录浏览功能;
autoindex_exact_size off; //关闭详细文件大小统计,让文件大小显示MB,GB单位,默认为b;
autoindex_localtime on; //开启以服务器本地时区显示文件修改日期!
}
#windows下php-fpm开启多个端口监听
1) 将upstream配置到和server{ }段同一级的的位置。
upstream fastcgi_backend {
server 127.0.0.1:9000;
server 127.0.0.1:9001;
server 127.0.0.1:9002;
server 127.0.0.1:9003;
server 127.0.0.1:9004;
}
"fastcgi_backend"是配置的这个upstream的名字。
2) 将location中的fastcgi_pass修改成前面配置的upstream。
location ~ \.php$ {
root D:/wnmp/www;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
标签:
原文地址:http://www.cnblogs.com/dream-bccb/p/5373305.html