目录 - 1. 前言- 2. 配置示例及指令说明 - 2.1 配置示例 - 2.2 指令 - 2.3 upstream相关变量- 3. 参数配置及测试 - 3.1 max_fails 和 fail_timeout - 3.2 proxy_next_upstream - 3.3 nginx 与后端we ...
分类:
其他好文 时间:
2019-03-14 22:30:34
阅读次数:
272
#运行用户 user www-data; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; #工作模式及连接数上限 ev ...
分类:
其他好文 时间:
2019-03-12 10:42:51
阅读次数:
194
This might give you a broader understanding of their difference: CGI: (common gateway interface) It is a specification "protocol" for transferring inf ...
分类:
Web程序 时间:
2019-03-10 20:47:43
阅读次数:
233
vi/usr/local/nginx/conf/fastcgi.conf修改内容(文件最下面)原内容:fastcgi_paramPHP_ADMIN_VALUE"open_basedir=$document_root/:/tmp/:/proc/";修改后fastcgi_paramPHP_ADMIN_VALUE"open_basedir=/mnt/hgfs:/tmp/:/proc/";
分类:
其他好文 时间:
2019-03-04 17:13:36
阅读次数:
197
1准备环境,两台主机:一台:httpd,php192.168.21.104安装包存放路径:/dataapr-1.6.5.tar.bz2httpd.apache.org#wgethttp://mirror.bit.edu.cn/apache//apr/apr-1.6.5.tar.bz2apr-util-1.6.1.tar.bz2httpd.apache.org#wgethttp://mirror.b
分类:
其他好文 时间:
2019-03-02 23:53:11
阅读次数:
225
FPM(FastCGI Process Manager)是PHP FastCGI运行模式的一个进程管理器,从它的定义可以看出,FPM的核心功能是进程管理,那么它用来管理什么进程呢?这个问题就需要从FastCGI说起了。 FastCGI是Web服务器(如:Nginx、Apache)和处理程序之间的一种 ...
分类:
其他好文 时间:
2019-03-01 09:28:44
阅读次数:
443
nginx.conf http节:keepalive_timeout 600; #客户端浏览器超时时间fastcgi_connect_timeout 600; #php-fpm连接超时时间(等待php执行的最长时间,超过这个会向浏览器返回504或502)fastcgi_send_timeout 60 ...
分类:
Web程序 时间:
2019-02-28 10:21:15
阅读次数:
221
获取 nginx 镜像 docker search nginx docker pull nginx 使用nginx镜像开启 nginx 应用容器 docker run -d --name nginx -p 8080:80 -v /tmp:/usr/share/nginx/html docker.io ...
分类:
Web程序 时间:
2019-02-27 01:37:44
阅读次数:
508
1、问题描述编译安装php7时指定了--with-config-file-path=/usr/local/php7/etc,修改了php.ini的配置后重启,但就是不生效。2、问题排查创建phpinfo()vim/usr/local/nginx/html/info.php<?phpphpinfo();?>访问info.php,发现LoadedConfigurationFile为空。编译
分类:
Web程序 时间:
2019-02-26 17:34:05
阅读次数:
201
某些操作,如用户注册后邮件发送,记录日志等一些耗时操作可以转化为异步操作!当PHP运行在FastCGI模式是提供了fastcgi_finish_request()函数,看下面例子: <?php echo '输出给客户端的内容'; fastcgi_finish_request(); sleep(3); ...
分类:
Web程序 时间:
2019-02-26 13:13:19
阅读次数:
520