微信自定义菜单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

最新文章

  1. Python编码问题整理
  2. [New Portal]Windows Azure Virtual Machine (12) 在本地使用Hyper-V制作虚拟机模板,并上传至Azure (2)
  3. The name does not exist in the namespace error in XAML
  4. 清除div中内容
  5. JS中对this的理解
  6. hmtl 中的定位
  7. RabbitMQ(三) -- Publish/Subscribe
  8. 【转】IE11的变化
  9. (转)INSTALLSHIELD 2010 预安装组件和软件
  10. 如何使一个网络下的2台路由器都可以dhcp上网
  11. struts2(一) struts2入门
  12. vue 生命周期
  13. .net core 2.x - 日志 - to elasticsearch - (2)
  14. Linux学习---位运算符
  15. go实现Windows服务注册
  16. http://nancyfx.org + ASPNETCORE
  17. iOS报错总结
  18. 【九天教您南方cass 9.1】 08 绘制等高线及对其处理
  19. 使用Profile和Resources Filter隔离测试环境
  20. LeetCode OJ 145. Binary Tree Postorder Traversal

热门文章

  1. 爬取IP
  2. 如何在Shell读取文件并赋值
  3. Linux OpenGL 实践篇-1 OpenGL环境搭建
  4. [项目推荐] Corcel 让你在 WordPress 中使用 Laravel
  5. [LeetCode] Max Consecutive Ones 最大连续1的个数
  6. tkinter 创建登陆注册界面
  7. WebApi-路由机制
  8. jstl标签库示例一
  9. [Tjoi2013]最长上升子序列
  10. Uva 11400 照明系统