• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

1.找到tomcat/conf/server.xml文件。

1xe0dwi5amt5071.png

2.编辑server.xml配置文件,找到引擎标签,添加以下内容:

gnjb151ozyd5072.png

在引擎元素中添加“host name=' ' appbase=' ' un parkwars=' ' auto deploy=' '/',其中:

名称:指定主机的名称。

AppBase:当前主机的应用发布目录

UnparkWARs:启动时是否自动解压war包?

自动部署:自动发布?

上下文路径='' docBase='webdemo' /

Path='' 3360以后网站直接通过域名www.webdemo.com打开,不需要其他路径。

指定要访问的项目的名称。

3.修改hosts文件,打开Finder,按快捷键组合Shift Command G找到文件,输入/etc/hosts,确认即可,复制出来修改。

feiprmeo24v5073.png

cutfg3ieusw5074.png

通过以上,域名和主机IP地址已经绑定在一起了。

4.重启tomcat

h54gsyj5p2f5075.png

5.核实结果

ep1xyobdo135076.png

Link to comment
Share on other sites