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

时间:2019-12-01 10:06:44   收藏:0   阅读:164

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

技术图片

 

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文件在游览器就能访问了

然后就妥了

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!