51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

nginx root txt文件校验

nginx root txt文件校验

1,由于微信需要验证校验文件,固需要配置文件

       location /l5nMPXmPub.txt {
           root  /home/static/aa/;
       }

这种配置方式访问的路径是根路径加上文件名称如:https://demo.com/l5nMPXmPub.txt

2,如果需要配置非根路径的话,例如访问路径是 :https://demo.com/a/b/test.txt

可通过如下方式配置

          location /a/b/test.txt {
          alias /home/static/a/b/test.txt;
        }
赞(2)
未经允许不得转载:工具盒子 » nginx root txt文件校验