国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

tomcat域名解析

Tomcat 域名解析一般項目開發(fā)時在Tomcat 服務(wù)器中發(fā)布后是通過http://localhost:post/porject來訪問的 而實際發(fā)布中一般需要通過郁悶來訪問下面就來介紹一下tomc

Tomcat 域名解析

一般項目開發(fā)時在Tomcat 服務(wù)器中發(fā)布后是通過http://localhost:post/porject來訪問的 而實際發(fā)布中一般需要通過郁悶來訪問下面就來介紹一下tomcat 域名解析

1、 關(guān)系到域名自然想到host 文件的修改進入C:WINDOWSsystem32driversetc找到

host 文件。內(nèi)容為:

# 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

修改最后一行 為

127.0.0.1 www.xxx.com.cn (你需要使用的域名)

2、 修改Tomcat 配置

在Tomcat 安裝目錄中找到conf 文件夾下的server.xml 文件,修改兩處

(1)、將端口號修改為80,端口80時默認(rèn)不顯示

(2)、修改Host 節(jié)點 name 屬性為你需要使用的域名,在host 節(jié)點下添加Context 節(jié)

點形式如:

path=""

docBase="E:apache-tomcat-6.0.20apache-tomcat-6.0.20wtpwebappswwwroot" debug="0"/>

docbase 屬性是你發(fā)布的項目所在tomcat 中的目錄,訪問時直接過濾掉wwwroot 根節(jié)點。即如上所示wwwroot" 為項目名稱的項目訪問時,將直接從wwwroot 以下的目錄開始訪問

如http://localhost:post/wwwroot 經(jīng)過上面步驟以后將變成

,
標(biāo)簽: