微信公众号开发443端口,本地服务器,小记

来源:互联网 发布:python 去除列表重复 编辑:程序博客网 时间:2024/04/29 10:46

这两天准备学习微信公众号开发,


微信公众号服务器配置只支持80和443端口,只能用域名,(当然可以申请测试号)


域名申请了,提交备案要20天


我准备用家里的服务器


联通华为光猫,外网映射80端口失败,可能是路由器管理界面占用了80端口,可能是运营商屏蔽了80端口


于是换成443端口,https


搭建个https服务器


我真是太聪明了


flask https :  http://blog.csdn.net/mingzznet/article/details/51002440

centos7 开放端口: http://blog.csdn.net/mingzznet/article/details/50984449

python https:

import BaseHTTPServer, SimpleHTTPServer

import ssl

httpd = BaseHTTPServer.HTTPServer(('0.0.0.0',443), SimpleHTTPServer.SimpleHTTPRequestHandler)

httpd.socket = ssl.wrap_socket (httpd.socket, certfile='localhost.pem', server_side=True)

httpd.serve_forever()


微信公众号开发:http://mp.weixin.qq.com/wiki/home/



0 0
原创粉丝点击