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


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

然后就妥了

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM