微信自定义菜单url默认80端口问题解决
2024-08-26 02:55:40
微信自定义菜单url默认80端口的,但是有些服务器上可能配置了多个tomcat。或者是刚好你服务器上80端口被占用了。在这样的情况下,我们可以通过如下方式解决:
首先安装apache,关于apache安装可以阅读博主的另外一篇文章:
http://blog.csdn.net/u013142781/article/details/50753534
接下了需要配置httpd.conf文件。
假设你的微信自定义菜单可信域名为:wechat.luo.com
应用名为:web_exception_project-0.0.1-SNAPSHOT
端口为:8080
可以在httpd.conf中添加如下内容:
ServerName 127.0.0.1
NameVirtualHost *:80
<VirtualHost *:80>
ServerName 127.0.0.1
ProxyRequests Off
AllowEncodedSlashes Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /web_exception_project-0.0.1-SNAPSHOT http://wechat.luo.com:8080/web_exception_project-0.0.1-SNAPSHOT
ProxyPassReverse /web_exception_project-0.0.1-SNAPSHOT http://wechat.luo.com:8080/web_exception_project-0.0.1-SNAPSHOT
</VirtualHost>
除了设置httpd.conf外,还需要在hosts文件(一般在/etc目录下)里面添加映射:
你的服务器内网ip wechat.luo.com
如博主的是:
10.75.201.53 wechat.luo.com
最新文章
- Python编码问题整理
- [New Portal]Windows Azure Virtual Machine (12) 在本地使用Hyper-V制作虚拟机模板,并上传至Azure (2)
- The name does not exist in the namespace error in XAML
- 清除div中内容
- JS中对this的理解
- hmtl 中的定位
- RabbitMQ(三) -- Publish/Subscribe
- 【转】IE11的变化
- (转)INSTALLSHIELD 2010 预安装组件和软件
- 如何使一个网络下的2台路由器都可以dhcp上网
- struts2(一) struts2入门
- vue 生命周期
- .net core 2.x - 日志 - to elasticsearch - (2)
- Linux学习---位运算符
- go实现Windows服务注册
- http://nancyfx.org + ASPNETCORE
- iOS报错总结
- 【九天教您南方cass 9.1】 08 绘制等高线及对其处理
- 使用Profile和Resources Filter隔离测试环境
- LeetCode OJ 145. Binary Tree Postorder Traversal