using just the Method Installation OpenCms after that, the site URL there will be a total of two OpenCms , resulting in Access URL The path is too long and the following is an explanation for removing two OpenCms the method.
1. Get rid of the first OpenCms
installed with ROOT installation, that is , Opencms.war renamed Root.war to webapp under the installation, so that the first /opencms is removed without configuring any other parameters.
the installation path at this time:Http://localhost:8080/setup
2. Get rid of the second OpenCms
The following steps are implemented using the Urlrewrite module:
( 1) download urlrewrite-3.2.0.jar bag, put jar package put to tomcat root directory / webapps/root/web-inf/lib directory;
(2) Create a new one in the Tomcat root directory/webapps/root/web-inf/directory Urlrewrite.xml File, code listing see 1;
Code Listing 1 Tomcat root directory /webapps/root/web-inf/ Urlrewrite.xml
<?xml version= "1.0" encoding= "Utf-8"?>
<! DOCTYPE urlrewrite Public "-//tuckey.org//dtd urlrewrite 3.2//en"
"Http://tuckey.org/res/dtds/urlrewrite3.2.dtd" >
<!--
Configuration file for Urlrewritefilter
http://tuckey.org/urlrewrite/
-
<urlrewrite>
<rule>
<from>^/tc-mgr/(. *) $</from>
<to>/tc-mgr/$1</to>
</rule>
<rule>
<condition type= "Request-uri" operator= "NotEqual" >^/export/.*$</condition>
<condition type= "Request-uri" operator= "NotEqual" >^/resources/.*$</condition>
<condition type= "Request-uri" operator= "NotEqual" >^/opencms-errorhandler/.*$</condition>
<condition type= "Request-uri" operator= "NotEqual" >^/webdav/.*$</condition>
<condition type= "Request-uri" operator= "NotEqual" >^/opencms/.*$</condition>
<condition type= "Request-uri" operator= "NotEqual" >^/setup/.*$</condition>
<from>^/(. *) $</from>
<to>/opencms/$1</to>
</rule>
</urlrewrite>
(3) After creating the urlrewrite.xml file, open the tomcat root directory /webapps/ Root/web-inf/web.xml file, locate the following code snippet:
<listener>
<listener-class>org.opencms.main.OpenCmsListener</listener-class>
</listener>
then add the filter configuration code behind it, see listing 2;
Code Listing 2 tomcat root directory /webapps/root/web-inf/web. xml: New filter configuration
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
<init-param>
<param-name>confReloadCheckInterval</param-name>
<param-value>-1</param-value>
</init-param>
<init-param>
<param-name>logLevel</param-name>
<param-value>ERROR</param-value>
</init-param>
<init-param>
<param-name>statusEnabled</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>statusPath</param-name>
<param-value>/status</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
(4) Next modify the tomcat root directory /webapps/root/web-inf/config/ Opencms-importexport.xml, locate the following configuration code snippet:<vfs-prefix>${context_name}/${servlet_name}</vfs-prefix >, delete the /${servlet_name}, which iseventually modified to:
<vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
at this point, the second/opencms removal success, remember to restart the Tomcat Server after modification, the home address is as follows:
Http://localhost:8080/index.html
the login page link address for the OpenCms background workspace is as follows:
http://localhost:8080/system/login/
URL path minus two OpenCms