[opencms-dev] getting rid of the opencms/opencms/ prefix

Marcus Popetz marcus at roundpeg.com
Thu Oct 13 16:47:36 CEST 2005


I should add that I installed opencms as it ships as a webapp named "opencms".

It comes as a .war, I suggest expanding that and then dropping the 
directory into the tomcat webapps directory lest you get bit by a problem I 
had.  I dropped the .war in webapps/, tomcat extracted it for me, I edited 
my config files as in the readme and went back to delete the .war just to 
clean up when I was finished and tomcat deleted my opencms/ directory.  *sigh*

-mp

At 10:42 AM 10/13/2005, Marcus Popetz wrote:
>At 10:35 AM 10/13/2005, Christoph P. Kukulies wrote:
>>What would be a first test to see if the jk-connector works?
>>
>>My logs show that the mod_jk is loaded fine. But with the
>>rewrite code of Sebastians "get rid" document (in my Virtualhost entry)
>>I now get
>>HTTP Status 404 - /${WEBAPP_NAME}/opencms/
>>
>>when I simply open http://localhost
>>
>>in my browser. (The apache welcome screen should appear).
>
>I think the opencms welcome page should appear...
>
>You have to replace ${WEBAPP_NAME} with whatever you installed opencms as 
>in tomcat.  My httpd.conf looked like this after I replaced the variable names.
>
>JkWorkersFile conf/workers.properties
>JkLogFile logs/mod_jk.log
>JkLogLevel info
>JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>JkOptions +ForwardKeySize +ForwardURICompat
>
>         DocumentRoot "D:/Tomcat 5.5/webapps/opencms/"
>JkMount /* ocms
>
>
>NameVirtualHost *
>
><VirtualHost *>
>
>    ServerAdmin administrator at site.com
>    ServerName   stage1.academyart.edu
>    ErrorLog logs/www_error.log
>    CustomLog logs/www_custom.log common
>
>
>
># If the requested URI is located in the resources folder, do not forward 
>the request
>SetEnvIfNoCase Request_URI ^/opencms/resources/.*$ no-jk
>SetEnvIfNoCase Request_URI ^/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} !^/opencms/resources/.*$
>RewriteCond %{REQUEST_URI} !^/export/.*$
>RewriteRule !^/opencms/opencms/(.*)$ /opencms/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 .* 
>/opencms/opencms/handle404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} [P]
>
># If the request starts with /${WEBAPP_NAME}/resources, delete the 
>/${WEBAPP_NAME} prefix
>RewriteCond %{REQUEST_URI} ^/opencms/resources/.*$
>RewriteRule ^/opencms/(.*)$ /$1
>
>
></VirtualHost>
>
>
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev




More information about the opencms-dev mailing list