[opencms-dev] Tomcat 7 + Apache 2.4 and Opencms 8
Cavva79
davide.cavarretta at gmail.com
Sun Sep 16 00:04:47 CEST 2012
Hi all,
it's a full day that I'm trying to make working the configuration described
here
http://www.opencms-wiki.org/wiki/Avoiding_/opencms/opencms_in_the_URL_%28apache_%2B_mod_proxy%29
but every time I'm activating it I start with great login loop while I'm
trying to login to workplace.
I made those modification on the config file of opencms:
1. opencms-system.xml
<sites>
<workplace-server>http://mysite</workplace-server>
<default-uri>/</default-uri>
<shared-folder>/shared/</shared-folder>
<site server="http://mysite" uri="/sites/default/"/>
</sites>
2. opencms-importexport.xml
<rendersettings>
<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
<vfs-prefix>/</vfs-prefix>
<userelativelinks>false</userelativelinks>
<exporturl>http://127.0.0.1:8081${CONTEXT_NAME}/handle404</exporturl>
<plainoptimization>true</plainoptimization>
<testresource uri="/system/shared/page.dtd"/>
<resourcestorender>
<regex>/sites/.*</regex>
<regex>/system/workplace/commons/style/.*</regex>
<regex>/system/galleries/.*</regex>
<regex>/system/modules/.*/resources/.*</regex>
</resourcestorender>
</rendersettings>
And on tomcat server.xml:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Connector port="8081" emptySessionPath="true" maxHttpHeaderSize="8192"
maxThreads="150"
minSpareThreads="25" maxSpareThreads="75" enableLookups="false"
redirectPort="8443" acceptCount="100" proxyName="mysite"
proxyPort="80" useBodyEncodingForURI="true" connectionTimeout="20000"
disableUploadTimeout="true" />
Finally on the Apache 2.4 httpd-vhosts.conf:
<VirtualHost *:80>
ServerAdmin webmaster at mysite
DocumentRoot "/var/www//mysite"
ServerName mysite
ServerAlias www.mysite
ErrorLog "/var/log/www/apache2/log/cd79.it/error_log"
CustomLog "/var/log/www/apache2/log/cd79.it/access_log" common
# Allow accessing the document root directory
<Directory "/var/www//mysite">
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
RewriteEngine On
LogLevel error rewrite:trace1
RewriteCond %{REQUEST_URI} ^/opencms/export/(.*)[NC]
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}" !-f
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f
RewriteRule .*
http://127.0.0.1:8081/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 [PT]
# Also redirect all other 404 errors to OpenCms
ErrorDocument 404 /system/shared/handle404.html
RedirectPermanent /opencms/opencms/ http://mysite/
ProxyPass /opencms/opencms/ !
ProxyPass /opencms/resources/ !
ProxyPass /opencms/export/ !
ProxyPass / http://127.0.0.1:8081/opencms/opencms/
ProxyPassReverse / http://127.0.0.1:8081/opencms/opencms/
</VirtualHost>
But still nothing is working.
I've already searched on inet all day, finding few answer such be sure that
the connector has emptySessionPath="true".
Any suggestion?
Thank you in advance
Davide
--
View this message in context: http://old.nabble.com/Tomcat-7-%2B-Apache-2.4-and-Opencms-8-tp34436768p34436768.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.
More information about the opencms-dev
mailing list