一、tomcat中的项目绑定到域名通过域名访问
1、在tomcat下的conf/server.xml中找到Host修改(1、name为你的域名,2、配置Context中的path为空就是直接访问项目不需要加项目路径,3、docBase为在tomcat中webapps下的项目文件夹名)
<Host name="www.xxxx.cn" appBase="webapps" unpackWARs="true" autoDeploy="true"> <!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
--> <!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Context path="" docBase="/XyPlat" reloadable="true"/>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
2、将端口号改为:80(tomcat默认是:8080)
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
二、免安装版tomcat在windows下配置运行内存
找到tomcat/bin/catalina.bat文件,打开编辑在set JPDA= 下面加入配置信息红色部分为我的配置(参数详解请自行百度这里就不详说了)
set _EXECJAVA=%_RUNJAVA%
set MAINCLASS=org.apache.catalina.startup.Bootstrap
set ACTION=start
set SECURITY_POLICY_FILE=
set DEBUG_OPTS=
set JPDA=
set JAVA_OPTS=-Xms512m -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512m
if not ""%1"" == ""jpda"" goto noJpda