<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1">Hi,<br>
I have this server configuration:<br>
- Tomcat7<br>
- Apache 2.4<br>
- OpenCMS 9.5.4<br>
<br>
I need to remove {CONTEXT_NAME}/opencms from URL.<br>
<br>
With Tomcat6 Apache OpenCMS 9.5.x I use this configuration<br>
<br>
WEB-INF/config/opencms-importexport.xml<br>
<i><rendersettings></i><i><br>
</i><i> <rfs-prefix>/export</rfs-prefix></i><i><br>
</i><i> <vfs-prefix></vfs-prefix></i><i><br>
</i><i> ...</i><i><br>
</i><i></rendersettings></i><br>
<br>
WEB-INF/config/opencms-system.xml<br>
<i><sites></i><i><br>
</i><i>
<workplace-server><a class="moz-txt-link-freetext" href="http://">http://</a>{DOMAIN}</workplace-server></i><i><br>
</i><i> <default-uri>/sites/default/</default-uri></i><i><br>
</i><i> <site server="</i></font><font size="-1"><i><font
size="-1"><a class="moz-txt-link-freetext" href="http://">http://</a>{DOMAIN}</font></i><i>"
uri="/sites/default/"/></i><i><br>
</i><i> ...</i><i><br>
</i><i></sites></i><br>
<br>
VirtualHost<br>
<i><VirtualHost 158.58.173.69:80></i><i><br>
</i><i> ServerAdmin info@{MY-DOMAIN-NAME}.com</i><i><br>
</i><i> ServerName www.{MY-DOMAIN-NAME}.com</i><i><br>
</i><i> ServerAlias {MY-DOMAIN-NAME}.com</i><i><br>
</i><i> ErrorLog
${APACHE_LOG_DIR}/{MY-DOMAIN-NAME}.com-error_log</i><i><br>
</i><i> CustomLog
${APACHE_LOG_DIR}/{MY-DOMAIN-NAME}AWS.com-access_log combined</i><i><br>
</i><i> DirectoryIndex index.html</i><i><br>
</i><i><br>
</i><i> # If the requested URI is located in the resources
folder, do not forward the request</i><i><br>
</i><i> SetEnvIfNoCase Request_URI
^/{MY-CONTEXT-NAME}/resources/.*$ no-jk</i><i><br>
</i><i><br>
</i><i> # If the requested URI is static content do not forward
the request</i><i><br>
</i><i> SetEnvIfNoCase Request_URI ^/export/.*$ no-jk</i><i><br>
</i><i><br>
</i><i> RewriteEngine on</i><i><br>
</i><i> # If the requested URI is NOT located in the resources
folder.</i><i><br>
</i><i> # Prepend an /isgas/opencms to everything that does not
already starts with it</i><i><br>
</i><i> # and force the result to be handled by the next
URI-handler ([PT]) (JkMount in this case)</i><i><br>
</i><i> RewriteCond %{REQUEST_URI}
!^/{MY-CONTEXT-NAME}/resources/.*$</i><i><br>
</i><i> RewriteCond %{REQUEST_URI} !^/export/.*$</i><i><br>
</i><i> RewriteRule !^/{MY-CONTEXT-NAME}/opencms/(.*)$
/{MY-CONTEXT-NAME}/opencms%{REQUEST_URI} [PT]</i><i><br>
</i><i><br>
</i><i> # These are the settings for static export. If the
requested resource is not already</i><i><br>
</i><i> # statically exported create a new request to the
opencms404 handler. This has to be</i><i><br>
</i><i> # a new request, because the current would net get
through mod_jk because of the "no-jk" var.</i><i><br>
</i><i> RewriteCond %{REQUEST_URI} ^/export/.*$</i><i><br>
</i><i> RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f</i><i><br>
</i><i> RewriteCond
"%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f</i><i><br>
</i><i> RewriteRule .*
/{MY-CONTEXT-NAME}/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING}
[P]</i><i><br>
</i><i><br>
</i><i> # If the request starts with
/{MY-CONTEXT-NAME}/resources, delete the /{MY-CONTEXT-NAME}
prefix</i><i><br>
</i><i> RewriteCond %{REQUEST_URI}
^/{MY-CONTEXT-NAME}/resources/.*$</i><i><br>
</i><i> RewriteRule ^/{MY-CONTEXT-NAME}/(.*)$ /$1</i><i><br>
</i><i><br>
DocumentRoot /MY/DOCUMENT/ROOT</i><i><br>
</i><i> JkMount /* ajpconnector</i><i><br>
</i><i></VirtualHost></i><br>
<br>
If I use this configuration in Tomcat7 I see the site in online
view but if I do the login in
<a class="moz-txt-link-freetext" href="http://www">http://www</a>.{MY-DOMAIN-NAME}.com/system/login I have no error in
logs but I'm not redirect in Workplace (or in the home editable)
but I have redirect always in online view. Is it correctable?<br>
Can I use OpenCMS9.5.x with Tomcat7 (or 8) anche Apache
configuring all as I did with Tomcat6?<br>
<br>
So I follow this documentation but I have the problem that my
OpenCMS can't be the ROOT (I have some OpenCMS instances and I
can't put a Tomcat installation for each)<br>
<a class="moz-txt-link-freetext" href="http://documentation.opencms.org/opencms-documentation/server-installation/apache-webserver-configuration/">http://documentation.opencms.org/opencms-documentation/server-installation/apache-webserver-configuration/</a><br>
<br>
Thanks<br>
Andrea</font><br>
</body>
</html>