您的位置 首页 nginx

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;
        }

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章