惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 横渡

[Linux] - 修改ls/ll显示的时间格式 [MySql] - Windows MySql 8.x 手动zip包安装与外网访问登录权限设定 [Windows] - DNS防污染工具Pcap_DNSProxy [Linux] - 服务器/VPS一键检测带宽、CPU、内存、负载、IO读写 [Windows] - Windows/Office纯绿色一键激活工具及方法 [Linux] - 利用ping给端口加密,限制访问 [Linux] - Windows与Linux网络共享文件夹挂载方法 [Linux] - 网速测试命令 [Linux] - CentOS运行DotNet Web程序 [Linux] - SVN忽略文件夹更新的命令与方法 [Linux] - n2n内网穿透 [Linux] - [转]*** Python版一键安装脚本 - 横渡 [Andriod] - Andriod Studio + 逍遥模拟器 [Linux] - centos使用mount + nfs 远程共享存储 [Linux] - Docker pure-ftp使用 [Linux] - Docker移动数据到其它盘的办法 [Nginx] - 负载均衡配置 [Linux] - 定时任务crontab [Linux] - 攻击查看与IP查封 [Linux] - Docker制作nginx+php
[Nginx] - PHP+FPM相关的配置
横渡 · 2016-07-06 · via 博客园 - 横渡

CodeIgniter的配置:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    fastcgi_connect_timeout 300s;
    fastcgi_send_timeout 300s;
    fastcgi_read_timeout 300s;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 8 128k;#8 128
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    #gzip  on;

    server {
        listen       80;
        #server_name  localhost;

        location / {
                root   html;
                index  index.php index.html index.htm;
                try_files $uri $uri/ /index.php?$uri&$args;
        }

        location ~ \.php$ {
                include        fastcgi_params;
                root           html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
        }
    }

}

ThinkPHP配置:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    fastcgi_connect_timeout 300s;
    fastcgi_send_timeout 300s;
    fastcgi_read_timeout 300s;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 8 128k;#8 128
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    #gzip  on;

    server {
        listen       80;
        #server_name  localhost;

        location / {
                root   html;
                index  index.php index.html index.htm;
                #try_files $uri $uri/ /index.php?$uri&$args;
                if (!-e $request_filename) {
                        rewrite ^(.*)$ /index.php?s=$1 last;
                        break;
                }
        }

        location ~ \.php$ {
                #include        fastcgi_params;
                include        fastcgi.conf;
                root           html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_split_path_info  ^(.+\.php)(/.*)$;
                fastcgi_param  PATH_INFO $fastcgi_path_info;
        }
    }

}

Laravel配置:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    fastcgi_connect_timeout 300s;
    fastcgi_send_timeout 300s;
    fastcgi_read_timeout 300s;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 8 128k;#8 128
    fastcgi_busy_buffers_size 256k;
    fastcgi_temp_file_write_size 256k;
    fastcgi_intercept_errors on;
    #gzip  on;

        server {
                listen 80;
                #server_name localhost;
                root /usr/local/nginx/html/public;
                index index.html index.php;

                location / {
                        try_files $uri $uri/ /index.php$is_args$query_string;
                }

                location ~ \.php$ {
                        try_files $uri =404;
                        fastcgi_pass 127.0.0.1:9000;
                        fastcgi_index index.php;
                        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                        include fastcgi_params;
                }
        }
}

前提是要启动PHP的FPM(默认端口为9000):

/usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini -y /usr/local/php/etc/php-fpm.conf