tomcat服务器配置域名访问项目server.xml
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources> <!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina"> <!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
--> <!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the BIO implementation that requires the JSSE
style configuration. When using the APR/native implementation, the
OpenSSL style configuration is required as described in the APR/native
documentation -->
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
--> <!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> <!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html --> <!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost"> <!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
--> <!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm> <Host name="www.haiyangsvs.com" debug="0" appBase="D:\apache-tomcat-7.0.53\webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="\MSHCSHP\websites" reloadable="true" crossContext="true"/>
<Context path="/Mshc" docBase="\SHOP\Mshc" reloadable="true" crossContext="true"/>
<Alias>www.haiyangsvs.com</Alias>
<Alias>haiyangsvs.com</Alias>
</Host> <Host name="www.yang360.com" debug="0" appBase="D:\apache-tomcat-7.0.53\webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="\STORE\Store" reloadable="true" crossContext="true"/>
<Context path="/Store" docBase="\STORE\Store" reloadable="true" crossContext="true"/>
<Context path="/MshcShop" docBase="\MSHCSHOP\MshcShop" reloadable="true" crossContext="true"/>
<Alias>www.yang360.com</Alias>
<Alias>yang360.com</Alias>
</Host>
</Engine>
</Service>
</Server>
tomcat服务器配置域名访问项目server.xml的更多相关文章
- 配置tomcat,实现域名访问项目
首先,配置tomcat端口号为80,配置方法:配置tomcat,访问端口改为80 然后,配置访问项目时候,不用项目名,配置方法:配置tomcat,使访问项目时候无项目名 最后,配置tomcat的ser ...
- tomcat配置通过域名访问项目
tomcat配置通过域名访问项目,是修改conf/server.xml里面的配置信息实现.具体如下: (1)修改Connector节点的port属性值 <Connector port=" ...
- 阿里云服务器CentOS6.9 tomcat配置域名访问
之前一直是ip访问项目,今天申请到一个测试域名,想要用设置用域名访问项目. 1.进入阿里云服务器中,修改tomcat中server.xml文件 cd /usr/local/apache-tomcat/ ...
- Tomcat配置使用域名访问项目
找到tomcat下的conf文件夹,打开server.xml文件 在操作之前要把域名映射到服务器上.测试办法就是,打开cmd 输入ping 域名,能够显示对应的ip即可 首先把访问端口改为80访问. ...
- tomcat原理(一)server.xml中的host虚拟主机的理解
一.Tomcat服务器端口的配置 Tomcat的所有配置都放在conf文件夹之中,里面的server.xml文件是配置的核心文件. 如果想修改Tomcat服务器的启动端口,则可以在server.xml ...
- (原创)项目部署-Tomcat设置默认访问项目及项目重复加载问题处理
主要是通过配置<Tomcat安装目录>/conf/server.xml文件 步骤: 1.打开server.xml,在</Host>的上一行添加内容格式如下 <Contex ...
- tomcat服务器配置多个项目
修改tomcat的server.xml文件中的Engine标签下的Host标签如下: <Host name="www.a.com" appBase="webapps ...
- Tomcat多域名访问
对于域名解析相信很多小伙伴都了解过,就是我们在万网购买一个域名,比如hpugs.com,然后呢?我们希望域名与我们的服务器绑定,然后通过域名直接访问我们的项目,这就是本篇要和大家一起探讨的问题.下面开 ...
- TOMCAT服务器配置域名
最近做了个网站,用的是web'服务器是tomcat,框架式SpringMVC,功能做好后,就准备上线使用了, 手上已经有域名以及一台服务器,已经绑定好ip了,剩下的也就是配置Tomcat了,比较简单, ...
随机推荐
- Word课程笔记(秋叶系列课程)
课时010[视频]01 别说你会Word,你可能用错了! # 贯通三个核心: 大量重复的工作懂得批量处理:反复要做的固定操作固化成“模板”“套路”:碰到异常情况知道准确高效的解决: # 三个问题: 文 ...
- [CentOS7] 通过vncviewer屏幕扩展
方法一:通过vncserver来调整分辨率 这是博主最近才发现的,原来还可以直接通过在服务端通过设置vncserver来调整分辨率,方法如下: 接下来,我们要进行vncviewer屏幕扩展的设置: 点 ...
- CodeForces 114B 【STL应用】
思路: 原来string类能sort 和 swap....太强了.... 注意:字典序最小输出,因为某个地方写挫了,sort了n发,代码挫. #include <bits/stdc++.h> ...
- 定时器详解和应用、js加载阻塞、css加载阻塞
1.setTimeout().setInterval()详解和应用 1.1 详解: setTimeout.setInterval执行时机 1.2 存在问题: setInterval重复定时器可能存在的 ...
- DataGridView控件对Column的设置
http://stackoverflow.com/questions/18666582/datagridview-autofit-and-fill 1.Column覆盖所有width: dgv.Aut ...
- 799C(xjb)
题目链接: http://codeforces.com/problemset/problem/799/C 题意: 有c, d两种货币, 有 n 个货物, 可以用 c 货币或者 d 货币购买, 现在需要 ...
- bzoj2039: [2009国家集训队]employ人员雇佣(最小割)
传送门 膜一下大佬->这里 不难看出这是一个最小割的模型(然而我看不出来) 我们从源点向每一个点连边,容量为他能带来的总收益(也就是他能对其他所有经理产生的贡献) 然后从每一个点向汇点连边,容量 ...
- any cpu ×86 ×64
On a 32-bit machine: Any CPU: runs as a 32-bit process, can load Any CPU and x86 assemblies, will ge ...
- Multi-catch parameters are not allowed for source level below 1.7 报错处理
有可能是你项目右键build-path里面的这个东西 在项目上右键properties->project Facets->修改右侧的version 保持一致 还有一个就是Window里面 ...
- 关于dijkstra求最短路(模板)
嗯.... dijkstra是求最短路的一种算法(废话,思维含量较低, 并且时间复杂度较为稳定,为O(n^2), 但是注意:!!!! 不能处理边权为负的情况(但SPFA可以 ...