[opencms-dev] Integrating OpenCms, Tomcat and the Apache webserver with mod_proxy

Audrey Lehoux a.lehoux at eurelis.com
Wed Feb 3 11:22:00 CET 2010


Hi everybody !

 

I try to configure Apache, Tomcat and openCms to suppress the
/opencms/opencms/ prefix in the urls.

 

Here are extracts of my configurations:

 

opencms-importexport.xml 

    <rendersettings>

      <rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>

      <vfs-prefix></vfs-prefix>

      <userelativelinks>false</userelativelinks>

 
<exporturl>http://127.0.0.1:8080${CONTEXT_NAME}/handle404</exporturl>

      <plainoptimization>true</plainoptimization>

      <testresource uri="/system/shared/page.dtd"/>

      ...

    </rendersettings>

 

server.xml

  <Service name="Catalina">

 

    <Connector port="8080" maxHttpHeaderSize="8192"

               maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"

               enableLookups="false" redirectPort="8443"
acceptCount="100"

               connectionTimeout="20000" disableUploadTimeout="true" />

 

    <Connector port="8009" 

               enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />

 

    <Engine name="Catalina" defaultHost="localhost">

 

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

             resourceName="UserDatabase"/>

 

      <Host name="localhost" appBase="/home/test/www" unpackWARs="true"
autoDeploy="true" deployOnStartup="true">

            <Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="test" suffix=".log" timestamp="true"/>

            <Context path="/test" docBase="test" debug="1"/>

            <Context path="/manager"
docBase="/usr/local/java/tomcat/server/webapps/manager" debug="0"
privileged="true"/>

      </Host>

    </Engine>

  </Service>

 

httpd.conf

<VirtualHost *:8080>

        ServerName test.eurelis.info

        ServerAdmin test at eurelis.com

            DocumentRoot "/home/test/www"

            RewriteEngine on

            RewriteCond %{REQUEST_URI} ^/system/         [OR]

            RewriteCond %{REQUEST_URI} ^/en/    [OR]

            RewriteCond %{REQUEST_URI} ^/de/

            RewriteRule ^/(.*)$ /opencms/opencms/$1 [PT]

        ProxyVia On

        ProxyRequests On

        ProxyPass         /
http://test.eurelis.info/opencms/opencms/

        ProxyPassReverse  /
http://test.eurelis.info/opencms/opencms/

</VirtualHost>

 

Theses configurations are OK when I visit my site "test". But with
theses configurations I not able to login on the administration site.

I can see the login screen, I key in my login and password and when I
submit I'm redirected to the login screen with a message "Your login has
been successful" but I can not access to the contents as if I were not
connected.

 

Does anybody try to suppress the prefix /opencms/opencms with success?
Can you tell me what's wrong with my configuration?

 

Thanks for your help.

 

Regards, 

Audrey. 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20100203/a44cfc05/attachment.htm>


More information about the opencms-dev mailing list