Tomcat 配置域名
2010-08-27 17:40
295 查看
====>我的新浪小铺
1. 根据以下路径打到 hosts 文件,并修改。
(1)路径: C:\Windows\System32\drivers\etc
(2)hots 文件内容及修改
# Copyright (c) 1993-2009 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
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
在最后新增一行,IP和域名之间以空格隔开:
127.0.0.1 www.top117.com/
2. 修改tomcat 中server.xml文件,两处改动如下:
(1)修改端口,将端口改为80:
<Connector port="80" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100" />
(2)将主机名改为自己的域名,如下:
<Host name="www.top117.com/" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="D:/workspace/top117/WebRoot" path="" reloadable="true"/>
</Host>
docBase="" 指向自己项目的WebRoot目录
3. 在MyEclipse 下启动tomcat, 在IE中输入自己配置的域名访问一下,即可看到自己的项目。
1. 根据以下路径打到 hosts 文件,并修改。
(1)路径: C:\Windows\System32\drivers\etc
(2)hots 文件内容及修改
# Copyright (c) 1993-2009 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
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
在最后新增一行,IP和域名之间以空格隔开:
127.0.0.1 www.top117.com/
2. 修改tomcat 中server.xml文件,两处改动如下:
(1)修改端口,将端口改为80:
<Connector port="80" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100" />
(2)将主机名改为自己的域名,如下:
<Host name="www.top117.com/" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context docBase="D:/workspace/top117/WebRoot" path="" reloadable="true"/>
</Host>
docBase="" 指向自己项目的WebRoot目录
3. 在MyEclipse 下启动tomcat, 在IE中输入自己配置的域名访问一下,即可看到自己的项目。
相关文章推荐
- tomcat配置多个域名
- tomcat 配置不同二级域名间session共享 还要改源码 累。。。
- tomcat多域名配置
- Tomcat配置一个ip绑定多个域名
- Tomcat6 配置多虚拟主机,多域名绑定一IP
- Tomcat多域名配置(多个项目共用80端口)
- tomcat多域名配置
- TOMCAT的域名配置
- tomcat多域名绑定(server.xml配置)
- TOMCAT服务器配置域名
- tomcat配置不同域名访问不同APP项目
- Centos6.5生成环境配置--nginx1.9 + PHP+可多个tomcat(多个端口)+多域名+java web 负载均衡
- TOMCAT的域名配置
- tomcat配置虚拟域名
- tomcat 配置多个虚拟域名访问
- Tomcat的多域名访问配置
- Nginx+Tomcat配置转发到不同域名下的不同项目
- TOMCAT端口和域名配置
- Tomcat服务器域名访问方式配置方法(虚拟主机)
- tomcat 中配置域名和项目虚拟目录