zoukankan      html  css  js  c++  java
  • 阿里云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.11webappsJsonProject" 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.11webappsHaifa" debug="0" reloadable="true"/>
    6       </Host>

    3.编辑C:WindowsSystem32driversetc下的hosts文件加两条内容

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

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

  • 相关阅读:
    scanf使用尿性
    System : Assembly Programming
    Biology 03: Cardiovascular
    remove the smallest element from a linkedlist
    Relativity 04: CH4CH5
    Relativity 03: Space and Time in Classical Mechanics
    146 __str__和__repr__
    145 __init__和__new__
    144 __call__
    143 __doc__
  • 原文地址:https://www.cnblogs.com/xiaoliu66007/p/4652798.html
Copyright © 2011-2022 走看看