在请求超时下,Nginx 错误日志中,发现如下信息: 1 upstream timed out (110: Connection timed out) while reading upstream 这种情况主要在以下两种情况下发生: nginx proxy 需要适当的调整 proxy_read_timeout 值。 1 2 3 4 5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <?php $the_host = $_SERVER['HTTP_HOST']; // 取得当前域名 $the_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; // 判断地址后面部分 $the_url = strtolower($the_url); // 将英文字母转成小写 if ($the_url == "/index.php") // 判断是不是首页 {
pack 参数详情请参考 http://www.php.net/manual/en/function.pack.php 1 2 3 4 5 6 7 $info = array(0x33, 0x30, 0x35, 0x30, 0x30, 0x31, 0x35, 0x30, 0x2e, 0x36, 0x36); for ($i = 0; $i < sizeof($info) / 2; $i++) { $msg = pack("nvc*", $info[$i * 2], isset($info[$i * 2 + 1]) ? $info[$i * 2 + 1] : ''); echo trim($msg); } # output: 30500150.66 OR 1 2 3 4
1 2 3 4 5 安装时间同步软件 apt-get install ntpdate # tzselect 选择当前系统时区 # 或者通过复制文件修改系统时区设置 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 1 2 3 4 # 同步系统时间 /usr/sbin/ntpdate -s us.pool.ntp.org # 同步硬件时间 /usr/sbin/hwclock --systohc 使
解决办法 在 php.ini 找到 curl.cainfo = “d:/wamp/bin/php/php5.5.12/cacert.pem” 证书下载地址: http://curl.haxx.se/ca/cacert.pem
1.访问限制过滤 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 http { # 过滤提取cookie关键字段 map $http_cookie $session_id{ ~*session_adminer.+session_id%22%3Bs%3A32%3A%22(?<session>.+)%22%3Bs%3A10%3A%22ip_address $session; } # 连接限制 limit_conn_zone $binary_remote_addr zone=conn_addr:32m; # 请求并发限制 limit_req_zone $binary_remote_addr zone=req1_addr:32m rate=1r/s; server {
Chocolatey 为 windows 下的应用包管理器,和 linux 中的 yum,apt 的角色类似 安装方法如下: 以管理员身份运行 power shell,执行如下命令开启使用未签名脚本和来自其他用户的签名脚