<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 0, comments - 77, trackbacks - 0, articles - 356
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    Tomcat域名配置

    Posted on 2007-09-07 16:06 semovy 閱讀(650) 評論(0)  編輯  收藏 所屬分類: J2EE綜合

    打開tomhome/conf/下的server.xml

    添加以下內(nèi)容:

    <Host appBase="C:/aaaa" autoDeploy="true" debug="0" deployXML="true" liveDeploy="true" name="www.xxxxxxxx.com" unpackWARs="true">
    <Context cachingAllowed="true" cookies="true" crossContext="true" debug="0" docBase="C:/aaa/bbb" path="" privileged="false" reloadable="true" swallowOutput="false" useNaming="true" >
    </Context>
    </Host>
    僅僅這樣還是不夠的,配置后,現(xiàn)在輸入http://localhost:8080/以及你的IP:8080是沒有問題,可是要想從外網(wǎng)訪問就必需配置你的hosts文件了。

    windows服務(wù)器在:C:\WINNT\system32\drivers\etc\下,直接用記事本打開就可以了
    例:

    # Copyright (c) 1993-1999 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # For example:
    #
    #       102.54.94.97      rhino.acme.com           # source server
    #        38.25.63.10      x.acme.com               # x client host

    127.0.0.1        localhost
    *.*.*.*           www.***.com

    linux服務(wù)器在/etc/下,命令行下:vi hosts

    例:
    # Do not remove the following line, or various programs
    # that require network functionality will fail.
    127.0.0.1        localhost.localdomain    localhost        lkpor1
    *.*.*.*           www.***.com

    如果在Tomcat下面配置域名(如:www.***.com)的時候,同時又不希望客戶通過我們網(wǎng)站的IP或者域名訪問到Tomcat默認的ROOT,配制方法如下:
    1、打開Tomcat安裝目錄下的\conf\server.xml文件
    2、在server.xml中將原有的<Host name=“localhost“ appBase=“webapps“ ……>修改為<Host name=“您要配置的域名“ appBase=“webapps“……>
    3、在\conf\Catalina目錄下建立目錄“<您要配置的域名的名稱>”,然后建立ROOT.xml文件,其格式和\conf\localhost目錄下的ROOT.xml一致,但是內(nèi)容如下:
       <?xml version='1.0' encoding='utf-8'?>
       <Context displayName="Welcome to 56World!" docBase="D:\workplace\inbuilding" path="">
       </Context>
    其中docBase中的內(nèi)容就是你希望的打開您的域名(www.***.com) 的時候映射到的目錄和默認的網(wǎng)頁(如:index.jsp)
    4、啟動Tomcat服務(wù)器,就可以直接敲入域名訪問你要訪問的地址了。
    主站蜘蛛池模板: 久久久久亚洲av无码专区蜜芽| 亚洲一级在线观看| 91人成网站色www免费下载| 亚洲一区无码中文字幕乱码| 国产免费怕怕免费视频观看| 成全动漫视频在线观看免费高清版下载 | 久久综合亚洲色hezyo| 中文字幕中韩乱码亚洲大片| 日本片免费观看一区二区| 美女18一级毛片免费看| 亚洲视频在线观看网址| 日韩亚洲精品福利| 88av免费观看入口在线| 曰批免费视频播放在线看片二| 亚洲成av人影院| 国产在线19禁免费观看| 91九色精品国产免费| 成人免费乱码大片A毛片| 亚洲日韩国产一区二区三区在线| 亚洲综合色自拍一区| 在线免费观看毛片网站| 99久久99久久免费精品小说| 午夜不卡AV免费| 亚洲精品国产国语| 亚洲激情在线观看| 国产亚洲精午夜久久久久久| 毛片免费在线视频| 91禁漫免费进入| 久久免费视频一区| 免费国产va在线观看| 亚洲一线产区二线产区区| 亚洲高清在线观看| 亚洲最大av无码网址| 四虎影永久在线高清免费| 毛片高清视频在线看免费观看| 一级毛片不卡片免费观看| 国产精品免费在线播放| 69xx免费观看视频| 亚洲高清资源在线观看| 插鸡网站在线播放免费观看| 国产AV无码专区亚洲AWWW|