阿里云url解析,发布web后去除url中的端口号

归根结底就是80端口的使用,不是http的80 的 或 https的443  都得加端口号

[问题描述]

http://wisecores.wisers.com:8080/JsonProject/servlet/JsonServlet?action_flag=person

如上,如果发布出去,不可能挂个":8080"在url上。

 

1.以windows下的tomcat来测试

丢两个web项目进去

2.server.xml配置如下

1       <Host  name="wisecores.wisers.com" appBase="webapps"  unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
2                  <Context path="" docBase="F:\apache-tomcat-7.0.11\webapps\JsonProject" debug="0" reloadable="true"/>
3        </Host>
4        <Host  name="sls.microsoft.com" appBase="webapps"  unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
5                  <Context path="" docBase="F:\apache-tomcat-7.0.11\webapps\Haifa" debug="0" reloadable="true"/>
6       </Host>

 

3.编辑C:\Windows\System32\drivers\etc下的hosts文件加两条内容

127.0.0.1 sls.microsoft.com
127.0.0.1 wisecores.wisers.com

重启服务,访问的结果如下,这样就没有端口url了

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值