<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
  <channel>
    <title><![CDATA[拍拍尘土]]></title> 
    <link>http://blog.xg98.com/</link> 
    <description><![CDATA[五月枇杷黄，太湖银鱼肥]]></description> 
    <language>zh-cn</language> 
    <copyright><![CDATA[Copyright 2026, 拍拍尘土]]></copyright> 
    <webMaster><![CDATA[cxosoft@gmail.com (Admin)]]></webMaster> 
    <generator>LBS v2.0.313</generator> 
    <pubDate>Mon, 04 May 2026 19:35:26 +0800</pubDate> 
    <ttl>60</ttl>
  
    <item>
      <title><![CDATA[windows下使用winsw-1.18，把nginx和xxfpm，php php-cgi fastcgi 程序安装成服务运行]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2996]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 25 Apr 2025 10:59:56 +0800</pubDate> 
      <description><![CDATA[<b>第一步：nginx的服务配置</b><br />进入nginx文件目录，复制winsw-1.18，改winsw-1.18.exe为nginx-service.exe，<br />当前目录下新建 nginx-service.xml，内容如下：<div class="code">&lt;service&gt;<br />&nbsp;&nbsp; <br />&nbsp;&nbsp; &lt;id&gt;nginx&lt;/id&gt;<br />&nbsp;&nbsp; &lt;name&gt;nginx&lt;/name&gt;<br />&nbsp;&nbsp; &lt;description&gt;nginx&lt;/description&gt;<br />&nbsp;&nbsp; &lt;logpath&gt;D:/nginx1.19.5/logs&lt;/logpath&gt;<br />&nbsp;&nbsp; &lt;logmode&gt;rotate&lt;/logmode&gt;<br /><br />&nbsp;&nbsp; &nbsp; &lt;depend&gt;&lt;/depend&gt;<br />&nbsp;&nbsp; &nbsp; &lt;workingdir&gt;D:/nginx1.19.5&lt;/workingdir&gt;<br />&nbsp;&nbsp; &nbsp; &lt;executable&gt;D:/nginx1.19.5/nginx.exe&lt;/executable&gt;<br />&nbsp;&nbsp; &nbsp; &lt;stopexecutable&gt;D:/nginx1.19.5/nginx.exe -s stop&lt;/stopexecutable&gt;</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2996]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[新网互联获取的ssl证书，手动配置nginx使用的ssl格式（以及nginx和apache证书区别）]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2989]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Mon, 02 Dec 2024 14:53:10 +0800</pubDate> 
      <description><![CDATA[p.s. 现在都是3个月的免费证书，新网互联有便宜的ssl证书，但是生成的证书里面没有像其他平台一样自动生成nginx使用的证书文件，需要手动修改下。<br /><b>我们知道一般申请证书的过程涉及到4个证书文件：</b><br />1、blog.xg98.com.csr  证书签名申请<br />2、blog.xg98.com.key  私钥<br />3、blog.xg98.com.crt 签发的用户证书，点击证书能看到用户信息和有效期<br />4、root_bundle.crt  证书链（中间证书）<br /><br />nginx需要提供2个证书文件：一个key文件，一个crt文件（合并用户证书和中间证书）<br />apache需要提供3个证书文件：一个key文件，一个用户证书文件，一个中间证书（也就是证书链文件root_bundle.crt)<br /><span style="color:Red">所以nginx和apache的证书区别是，nginx把用户证书和中间证书合并为一个了</span><br />]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2989]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[高频访问IP限制 --Openresty(nginx + lua + redis)]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2839]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 22 Apr 2022 10:25:18 +0800</pubDate> 
      <description><![CDATA[在openresty下接入Lua脚本就一句话，下面给出nginx.conf示范:<br /><br /><b>nginx.conf</b><div class="code">worker_processes  1;<br />error_log logs/error.log;<br />events {<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; worker_connections 1024;<br />}<br />http {<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; server {<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;listen 80;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;location / {<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  access_by_lua_file &#39;lua/access.lua&#39;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  content_by_lua &#39;ngx.say(&quot;Welcome PENIS!&quot;)&#39;;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; }<br />}</div><br /><br /><b>access.lua</b><div class="code">-- package.path = &#39;/usr/loca</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2839]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[nginx 日志分析工具]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2732]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Fri, 20 Nov 2020 22:47:54 +0800</pubDate> 
      <description><![CDATA[GoAccess<br /><br />ELK]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2732]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[LNMP环境安装OpenResty的lua扩展方法（使用自定义编译的方法，waf测试可用）]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2730]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Mon, 16 Nov 2020 11:29:15 +0800</pubDate> 
      <description><![CDATA[<span style="color:Red">p.s. LNMP1.5以后，已经加了编译参数，打开后再编译可以直接让nginx支持lua。但是1.5之前的版本需要手动编译支持lua扩展。相关模块的版本可以自己寻找替换为最新的版本</span><br />对于LNMP1.5以后版本，打开目录下<b>lnmp.conf</b>，确认其中Enable_Nginx_Lua项，然后运行<b>upgrade.sh</b>选择nginx重新编译即可 <div class="code">Enable_Nginx_Openssl=&#39;y&#39;<br />Enable_Nginx_Lua=&#39;y&#39;<br />Enable_Swap=&#39;y&#39;<br /></div><br />非LNMP环境可以参考下文：<br /> &nbsp; &nbsp; Nginx + Lua 搭建网站WAF防火墙   <a href="https://www.cnblogs.com/dotnetcrazy/p/11306202.html" title="https://www.cnblogs.com/dotnetcrazy/p/11306202.html" target="_blank">https://www.cnblogs.com/dotnetcrazy/p/11306202.html</a><br /><br /><br />老左收到一封网友的邮件，提到如何在LNMP]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2730]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[LNMP一键安装包 ngx_lua_waf waf(web应用防火墙) 安装设置教程]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2728]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sat, 14 Nov 2020 22:50:46 +0800</pubDate> 
      <description><![CDATA[<b>WAF是啥？</b><br />WAF中文名是Web应用防火墙，WAF能够根据规则拦截SQL注入、恶意请求、黑客扫描等HTTP请求从而保护WEB应用的安全。<br />今天我们要说的是一个比较简单好用的基于lua的waf：ngx_lua_waf。<br />ngx_lua_waf是一个基于lua-nginx-module(openresty)的web应用防火墙，<a href="https://github.com/loveshell/ngx_lua_waf" title="https://github.com/loveshell/ngx_lua_waf" target="_blank">https://github.com/loveshell/ngx_lua_waf</a><br /><br /><b>WAF用途：</b><br /> &nbsp; &nbsp; &nbsp; &nbsp; 防止sql注入，本地包含，部分溢出，fuzzing测试，xss，SSRF等web攻击<br /> &nbsp; &nbsp; &nbsp; &nbsp; 防止svn/备份之类文件泄漏<br /> &nbsp; &nbsp; &nbsp; &nbsp; 防止ApacheBench之类压力测试工具的攻击<br /> &nbsp; &nbsp; &nbsp; &nbsp; 屏蔽常见的扫描黑客工具，扫描器<br /> &nbsp; &nbsp; &nbsp; &nbsp; 屏蔽异常的网络请求<br /> &nbsp; &nbsp; &nbsp; &nbsp; 屏蔽图片附件类目录php执行权限<br /> &nbsp; &nbsp; &nbsp; &nbsp; 防止webshell上传<br /><br /><b>ngx_lua_waf安装</b><br />]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2728]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[nginx的多个location有优先级之分，并非按顺序执行]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2724]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sat, 07 Nov 2020 10:05:28 +0800</pubDate> 
      <description><![CDATA[<b>1. 问题-背景</b><br /><br />以前也经常用nginx，但用的不深，通常是简单的设置个location用来做反向代理。直到今天给客户做项目碰到缓存问题：客户有个app，只是用原生做了个壳，里面的内容都是用h5写的，我们半途接手将新版本静态资源部署到服务器上后，发现手机端一直显示老的页面，一抓包，发现手机端根本就没有去请求新的html页面，定位是缓存问题。<br />2. 配置<br /><br />乍一看，客户原来的配置好像没什么问题，该有的也全有了<br /><br /># 这是客户原来的配置<div class="code">server {<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; listen       80 default_server;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; server_name  xxx.xxx.com;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; root         /app/xxx/html/mobile/;<br /><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; location ~ .*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2724]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[windows下安装nginx，并开启服务自动启动]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2660]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Sat, 18 Apr 2020 13:27:01 +0800</pubDate> 
      <description><![CDATA[p.s. 如果Nginx每次使用都需要手动启动确实很麻烦，所以最好将其设置为Windows系统服务，开机自启动就行了。<br />先dos测试运行 nginx.exe 能运行，配置文件正确，再配服务。一开始不能运行，再nginx日志里面发现nginx.conf有错误提示，另外服务不能启动，先dos中进入nginx目录，然后再 nginx-service.exe install。<br />windows下删除服务的常用方法<div class="code">sc delete windows服务名称</div><br /><br /><b><span style="color:Red">安装Nginx</span></b><br /><br />下载windows版nginx （ <a href="http://nginx.org/download/nginx-1.10.0.zip" title="http://nginx.org/download/nginx-1.10.0.zip" target="_blank">http://nginx.org/download/nginx-1.10.0.zip</a> ），之后解压到需要放置的位置（D:\xampp\nginx）<br /><br /><b><span style="color:Red">将Nginx设置为Windows服务</span></b><br /><br />需要借助&quot;Windows ]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2660]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[nginx自动添加ip黑名单]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2597]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Thu, 20 Jun 2019 14:41:22 +0800</pubDate> 
      <description><![CDATA[p.s. 效果可能不如 limit_req和limit_conn<br /><br /><b>blockip.sh</b><div class="code">#!/bin/bash<br />tail -n50 /home/wwwlogs/access.log |<br />awk &#39;{print $1,$7,$9}&#39; |<br />grep -i -v -E &quot;googleyahoobaidumsnbotFeedSkysogou360bingsoso403api&quot; |<br />awk &#39;{print $1}&#39; |  sort | uniq -c | sort -rn |<br />awk &#39;{if($1&gt;5)print &quot;deny &quot;$2&quot;;&quot;}&#39; &gt; /usr/local/nginx/conf/vhost/blockip.conf<br />/usr/local/nginx/sbin/nginx -s reload</div><br /><br /><b>Crontab中添加锁定时间</b>&#91;code]&#91;/code]]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2597]]></wfw:commentRss>
    </item>
      
    <item>
      <title><![CDATA[lnmp安装fileinfo扩展]]></title> 
      <link><![CDATA[http://blog.xg98.com/article.asp?id=2543]]></link> 
      <category><![CDATA[nginx]]></category> 
      <author><![CDATA[admin <null@null.com>]]></author> 
      <pubDate>Wed, 26 Sep 2018 22:09:50 +0800</pubDate> 
      <description><![CDATA[<a href="https://www.cnblogs.com/seafood/p/5462204.html" title="https://www.cnblogs.com/seafood/p/5462204.html" target="_blank">https://www.cnblogs.com/seafood/p/5462204.html</a><br /><br /><br />1、错误：<br /><br />　　PHP Fileinfo extension must be installed/enabled to use Intervention Image.<br /><br />2、原因：<br /><br />　　缺少 fileinfo扩展，一般安装包编译的时候考虑到fileinfo需要的资源比较多，所以没有在安装的时候编译安装这个扩展。<br /><br />3、解决方案：<br /><br />　　1) 从完整版安装包中解压相应的php版本tar包，在ext文件夹下找到fileinfo<br /><br />　　2) 安装扩展　　　<br /><div class="code">cd /lnmp1.2-full/src/php-5.6.9/ext/fileinfo<br />&nbsp;&nbsp; <br />/usr/local/php/bin/phpize<br />&nbsp;&nbsp; <br />./configure --with-php-config=/usr/local/php/bin/php-config<br />&nbsp;&nbsp; <br />make &amp;&amp; make install</div>]]></description>
      <wfw:commentRss><![CDATA[http://blog.xg98.com/feed.asp?q=comment&id=2543]]></wfw:commentRss>
    </item>
      
  </channel>
</rss>
