1、将下载的txt文件放入/usr/local/nginx/html/目录下面。

微信配置JS接口安全域名问题-Nginx配置

 

2、修改nginx.cong配置文件中的location标签

location / {
            root   html;
            index  index.html index.htm;
            proxy_set_header  X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_redirect off;
        }

3、加入完以后记得重启nginx服务

这样我们用域名+txt文件在游览器就能访问了

然后就妥了

 

相关文章:

  • 2022-01-02
  • 2021-11-20
  • 2022-01-22
  • 2021-07-12
  • 2021-11-20
  • 2022-12-23
  • 2021-06-07
猜你喜欢
  • 2021-05-16
  • 2022-12-23
  • 2021-11-28
  • 2021-10-14
  • 2021-12-26
  • 2022-12-23
  • 2021-12-13
相关资源
相似解决方案