[opencms-dev] How to remove opencms/opencms in tomcat 8 without using apache

Manoj.Sharma at nevagroup.com Manoj.Sharma at nevagroup.com
Tue Jan 5 13:36:00 CET 2016


Hi

I am trying to deploy OpenCms 9 in Tomcat without using apache or any 
proxy. I tried this "
http://www.opencms-wiki.org/wiki/Removing_the_/opencms/opencms_prefix_without_using_Apache
" and done all the things mentioned here but again i am not succeeded. I 
have also tried these urls "
http://lists.opencms.org/pipermail/opencms-dev/2011q3/035947.html", "
https://blog.codecentric.de/en/2013/08/opencms-8-avoiding-opencmsopencms-in-url-2/
", "http://www.ebel-computing.de/JSPWiki/Wiki.jsp?page=OpenCms", But again 
not succeeded.

opencms-importexport.xml

<rendersettings>
        <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
        <vfs-prefix>${CONTEXT_NAME}</vfs-prefix>
        <userelativelinks>false</userelativelinks>
        <exporturl>http://127.0.0.1:80$
{CONTEXT_NAME}/handle404</exporturl>
....
</rendersettings>

web.xml
<context-param>
        <param-name>OpenCmsServlet</param-name>
        <param-value>/*</param-value>
    </context-param>
 
    <context-param>
        <param-name>DefaultWebApplication</param-name>
        <param-value>ROOT</param-value>
    </context-param>

....

<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>


And whatever the configuration in the opencms, i have not changed. I have 
also created urlrewrite.xml


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN" "
http://tuckey.org/res/dtds/urlrewrite2.6.dtd">
<urlrewrite>
  <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>       <--- This rule is 
probably not necessary
   <from>^/(.*)$</from>
   <to>/opencms/$1</to>
</rule>
</urlrewrite>



Please help in this regard.

With Regards
Manoj Kumar Sharma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20160105/04fefe4b/attachment.htm>


More information about the opencms-dev mailing list