1、创建测试网站“ecntv”,在/sites/下创建名称为 ecntv 的文件夹,标题设置为“医指通”,如下图所示
2、在opencms-system.xml文件中,添加 <site server=" http://ecntv" uri="/sites/ecntv/"/>
![](http://dl.iteye.com/upload/attachment/171417/834ed456-040b-3b71-8a9f-d0111e45c852.jpg)
2、在opencms-system.xml文件中,添加 <site server=" http://ecntv" uri="/sites/ecntv/"/>
<sites>
<workplace-server>http://ecntv</workplace-server>
<default-uri>/sites/default/</default-uri>
<site server=" http://localhost" uri="/sites/default/"/>
<site server=" http://ecntv" uri="/sites/ecntv/"/>
</sites>
<workplace-server>http://ecntv</workplace-server>
<default-uri>/sites/default/</default-uri>
<site server=" http://localhost" uri="/sites/default/"/>
<site server=" http://ecntv" uri="/sites/ecntv/"/>
</sites>
3、在C:\WINDOWS\system32\drivers\etc文件下,修改hosts文件,添加站点的配置
127.0.0.1 localhost
192.168.1.100 ecntv
192.168.1.100 ecntv
注意: 192.168.1.100为本机ip地址。局域网访问ecntv站点时,必须在机器上配置ip,否则,局域网中不能查看到相对应站点的信息,只能查看到默认站点的内容,<workplace-server>http://ecntv</workplace-server>修改之后,访问的就是ecntv站点。
4、重启tomcat,再次登录,即可看到新建的站点,如下图所示
![](http://dl.iteye.com/upload/attachment/171428/22ff6644-ca95-3ec1-94fb-c38e20308fd3.jpg)