[opencms-dev] Remove /opencms/opencms in OpenCms 6.2
Alessandro Magnolo
alessandro.magnolo at gmail.com
Tue Apr 18 12:27:17 CEST 2006
Hello Manuel
> First of all the "this.servpath" line is now in the
> '/system/workplace/views/top_js.jsp' file I think.
OK, found and corrected
> The other problem with the stylesheet is in the Apache config.
>
> I cant say the exact way to get rid of this problem without the exact server
> config of you. What I mean is which version of apache, mod_jk, tomcat and so
> on are you using.
Apache/2.0.55 (Unix) mod_jk/1.2.6 Server
Apache Tomcat/5.5.12
java version "1.5.0_06"
Here is the portion of httpd.conf that is of interest. The webapp name
is "mysite":
<VirtualHost *:80>
ServerAdmin webmaster at mysite.bg.it
ServerName mysite.imteam.it
ServerAlias mysite.local mysite.imteam.local mysite.bg.it www.mysite.bg.it
# definizione log
CustomLog logs/mysite.imteam.it.log combined
RewriteEngine On
RewriteLog logs/mysite_rewrite.log
RewriteLogLevel 1
#RewriteRule ^/(.*)$ /opencms/opencms/$1 [PT]
# If the requested URI is located in the resources folder, do not
forward the request
SetEnvIfNoCase Request_URI ^/mysite/resources/.*$ no-jk
# If the requested URI is static content do not forward the request
SetEnvIfNoCase Request_URI ^/export/.*$ no-jk
RewriteEngine on
# If the requested URI is NOT located in the resources folder.
# Prepend an /opencms/opencms to everything that does not already starts with it
# and force the result to be handled by the next URI-handler ([PT])
(JkMount in this case)
RewriteCond %{REQUEST_URI} !^/mysite/resources/.*$
RewriteCond %{REQUEST_URI} !^/export/.*$
RewriteRule !^/mysite/opencms/(.*)$ /mysite/opencms%{REQUEST_URI} [PT]
# These are the settings for static export. If the requested resource
is not already
# statically exported create a new request to the opencms404 handler.
This has to be
# a new request, because the current would net get through mod_jk
because of the "no-jk" var.
RewriteCond %{REQUEST_URI} ^/export/.*$
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
RewriteRule .* /mysite/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING}
[P]
# If the request starts with /opencms/resources, delete the /opencms prefix
RewriteCond %{REQUEST_URI} ^/mysite/resources/.*$
RewriteRule ^/mysite/(.*)$ /$1
DocumentRoot "/var/tomcat/webapps/mysite/"
</VirtualHost>
More information about the opencms-dev
mailing list