Fw: [opencms-dev] SOLVED: install opencms under Apache, Tomcat, Webcp configuration

Maurizio Betti m.betti at arsweb.it
Mon Jun 7 11:09:01 CEST 2004


Hy Miroslav,

make attention: if you want only connect Apache and Tomcat please refer to 
module 'Alkacon OpenCms 5.0.x Howto: Setting up httpd, Tomcat and mod_proxy'.

In the other side if you want connect Apache and Tomcat under Webcp you 
have to open the <yourwebcpdirectory>/httpd/include/<numberofsite>.httpd 
and add the following:
----------------------------------------------------------------------
RewriteEngine On
RewriteRule ^/opencms/((.*)\.(html|htm|jsp|jhtml|gif|jpg))$ 
http://<yourdomain>:8087/opencms/opencms/$1
RewriteCond %{HTTP_HOST}                !^212.25.180.216(:80)?$
RewriteCond %{HTTP_HOST}                !^<yourdomain>(:80)?$
RewriteRule ^/(.*)              http://<yourdomain>/$1 [L,R]
-------------------------------------------------------------------------------------------------------

then create a tomcat connector on :8087 in server.xml l(in exmple see below).

In this way webcp pass to tomcat the execution of both dynamic and static 
resources.

I hope this can help you...

bye, Maurizio Betti


------------------------------------------ server.xml 
-------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<Server className="org.apache.catalina.core.StandardServer" debug="0" 
port="8005" shutdown="SHUTDOWN">
         <Listener 
className="org.apache.catalina.mbeans.ServerLifecycleListener" debug="0"/>
         <Listener 
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" 
debug="0"/>
         <GlobalNamingResources>
                 <Environment name="simpleValue" override="true" 
type="java.lang.Integer" value="30"/>
                 <Resource auth="Container" description="User database that 
can be updated and saved" name="UserDatabase" scope="Shareable" 
type="org.apache.catalina.UserDatabase"/>
                 <ResourceParams name="UserDatabase">
                         <parameter>
                                 <name>factory</name>
                                 <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
                         </parameter>
                         <parameter>
                                 <name>pathname</name>
                                 <value>conf/tomcat-users.xml</value>
                         </parameter>
                 </ResourceParams>
         </GlobalNamingResources>
         <Service className="org.apache.catalina.core.StandardService" 
debug="0" name="Tomcat-Standalone">
                 <Connector 
className="org.apache.coyote.tomcat4.CoyoteConnector" acceptCount="10" 
bufferSize="2048" connectionTimeout="20000" debug="0" enableLookups="true" 
maxProcessors="75" minProcessors="5" port="8087" 
protocolHandlerClassName="org.apache.coyote.http11.Http11Protocol" 
proxyPort="0" redirectPort="8443" scheme="http" secure="false" 
tcpNoDelay="true" useURIValidationHack="false">
                         <Factory 
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
                 </Connector>

                 <Connector 
className="org.apache.coyote.tomcat4.CoyoteConnector" acceptCount="10" 
bufferSize="2048" connectionTimeout="20000" debug="0" enableLookups="true" 
maxProcessors="75" minProcessors="5" port="8009" 
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" 
proxyPort="0" redirectPort="8443" scheme="http" secure="false" 
tcpNoDelay="true" useURIValidationHack="false">
                         <Factory 
className="org.apache.catalina.net.DefaultServerSocketFactory"/>
                 </Connector>


                 <Engine 
className="org.apache.catalina.core.StandardEngine" debug="0" 
defaultHost="localhost" 
mapperClass="org.apache.catalina.core.StandardEngineMapper" name="Standalone">
                         <Host 
className="org.apache.catalina.core.StandardHost" appBase="webapps" 
autoDeploy="true" configClass="org.apache.catalina.startup.ContextConfig" 
contextClass="org.apache.catalina.core.StandardContext" debug="0" 
deployXML="true" 
errorReportValveClass="org.apache.catalina.valves.ErrorReportValve" 
liveDeploy="true" mapperClass="org.apache.catalina.core.StandardHostMapper" 
name="<yourdomain>" unpackWARs="true">
                                 <Alias><yourdomain></Alias>
                                 <Context 
className="org.apache.catalina.core.StandardContext" cachingAllowed="true" 
charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" 
crossContext="true" debug="0" 
docBase="/usr/local/web/tomcat/webapps/opencms/" 
mapperClass="org.apache.catalina.core.StandardContextMapper" path="" 
privileged="false" reloadable="true" swallowOutput="false" useNaming="true" 
wrapperClass="org.apache.catalina.core.StandardWrapper">
         </Context>
                         </Host>
                         <Logger 
className="org.apache.catalina.logger.FileLogger" debug="0" 
directory="logs" prefix="catalina_log." suffix=".txt" timestamp="true" 
verbosity="1"/>
                         <Realm 
className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" 
resourceName="UserDatabase" validate="true"/>
                 </Engine>
         </Service>
</Server>
-------------------------------------------------------------------------------------------------------


















At 19.27 05/06/2004 -0400, you wrote:
>Hi Maurizio,
>
>I'd be interested in the steps involved in hooking up Apache and Tomcat.
>
>Miroslav
>
>----- Original Message -----
>From: "Maurizio Betti" <m.betti at arsweb.it>
>To: <opencms-dev at opencms.org>
>Sent: Saturday, June 05, 2004 3:20 AM
>Subject: [opencms-dev] SOLVED: install opencms under Apache, Tomcat, Webcp
>configuration
>
>
> > Hy all,
> >
> > I found the solution to install tomcat under Apache, Tomcat and webcp
> > config! If anybody has the same problem write to me.
> > Many thanks to Stefan Meier for the help.
> >
> > Maurizio Betti
> >
> > _______________________________________________
> > 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
> >
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20040607/6ee774a8/attachment.htm>


More information about the opencms-dev mailing list