|
|
Index
| Recent Threads
| Who's Online
| User List
| Register
| Search
| Help
| |
![]() |
OpenCms Forum » List all forums » Forum: Tutorials / HowTo's for OpenCms 7 » Thread: Multisite-, SSL, modRewrite- Tutorial |
|
Thread Status: Normal Total posts in this thread: 15
|
[Add To My Favorites] [Watch this Thread] |
| Author |
|
|
Member
|
This tutorial is based on a lot of informations from the opencms-Mailinglist, from opencms-forum.de, from alkacon opencms.org and it is based on the "Get rid of the /opencms/opencms-prefix"-Tutorial from Sebastian Himberger. prerequsites: installed and working Apache2 (mod_rewrite, mod_jk, mod_proxy) (tested with 2.2.3) Tomcat (tested with 6.0.13) OpenCms 6 or 7 (tested with 6.7.2 (7 beta 1 and 7rc2)) goals: - a lot of domains on one opencms - a clean URL (no opencms/opencms) - workplace with ssl - setting some OpenCms-resources to encrypted our environment: Debian etch 2.6.16-2-amd64-k8-smp Apache2 2.2.3 Java 1.6.0_01-b06 Apache Tomcat/5.5.23/6.0.13 with jsvc Opencms 6.2.3,7beta1,7rc2 If a different linux distribution is in use the default directories can be different, take care about that. Configure Tomcat: Enable the ajp13-Connector to communicate with apache-mod_jk edit the server.xml <!-- Define an AJP 1.3 Connector on port 8009 --> per default this tag is commeted out, just comment in and extend as in the example. Add the attribute address to make the connector just listening for the apacheWebServer. Comment the default connector on Port 8080 out to make the tomcat unreachable. Compiling and using the jsvc tool from the commons-daemon project. @see: http://tomcat.apache.org/tomcat-6.0-doc/setup.html and the attached start/stop-Script tomcat.sh Hint: You can install APR (Apache portable runtime) to increase the performance of tomcat. @see: http://tomcat.apache.org/tomcat-6.0-doc/apr.html for installing and compiling instructions. If you meet this "configure: error: APR could not be located. Please use the --with-apr option" try ./configure --with-apr=/usr/bin/apr-config or apr-1-config To start the tomcat with this compiled libs add
to CATALINA_OPTS. The Tomcat Log will tell you if it founds the native libs or not. Configure OpenCms: Edit the file opencms-system.xml in WEB-INF/config/
Be carefull the workplace-server must not be the same as any of the secure server. Edit the file opencms-importexport.xml in WEB-INF/config/ Just remove the opencms-String (webapp-name, servlet-name)
Login to the OpenCms-Workplace and create a new folder in the same hierarchy like /sites/test2 (must be the same name as in opencms-system.xml) To have the static export properly change the web.xml like this:
Configure mod_jk: After installing mod_jk you have a symlink jk.load in /etc/apache2/mods-enabled/. Create the file jk.conf in the /etc/apache2/mods-enabled directory jk.conf
Create the file workers.properties in the defined directory. workers.properties
Configure Apache2: To use different domains with its own certificate we use IP-based virtualhost because namebased is not possible. There are the directories /etc/apache2/sites-available with the virtualhostConfig and sites-enabled with symlinks to sites-available, you need the symlinks otherwise apache2 wouldn't recognize the configs. We need two config files per domain, one for http and one for https, you can put all the config in one file but that is not very clear. /etc/apache2/sites/available/$yourdomain.tld
and /etc/apache2/sites/available/$yourdomain.tld-ssl
Files attached: - tomcat.sh (start/stop-script) ---------------------------------------- ---------------------------------------- [Edit 2 times, last edit by Daniel at Mar 15, 2008 1:09:43 PM] |
||
|
|
Stranger
|
I've tried to use this tutorial for name based virtual hosting, but after doing the steps described I can't login any more. Am I right that I have to use the rules for the virtual host also on the subdomain that hosts the workspace? Can this be a problem with a cookie url? |
||
|
|
Stranger
|
emptySessionPath="true" wasn't set, as this was not in the default config file provided by tomcat. |
||
|
|
Member
|
You can not reach the opencms-workplace via domain.tld/system/login ? What do you see instead? Who answers Tomcat or Apache? regards Markus |
||
|
|
Stranger
|
I could reach it but the login didn't work because of the missing emptySessionPath="true". That solved my problem. |
||
|
|
Stranger
|
I installed openCMS 7.0.3 and without the multi-site i could do everything including the administration. I have configured using these instructions, and all the demos/documentation modules work, but when I try to login to /system/login/ the login says it was successful, but the popup goes back to the login dialog. here is virtual host of httpd.conf (the other files i believe are correct). please help! <VirtualHost 64.15.152.4> ServerName www.techwest.com ServerAlias www.rodeologic.com ServerAlias www.canadiannationals.com DocumentRoot /usr/share/tomcat5/webapps/opencms/ RewriteEngine on RewriteCond %{HTTP_HOST} ^trailriding.ab.ca$ [NC] RewriteRule ^(.*)$ $1 [PT] SetEnvIfNoCase Request_URI ^/opencms/resources/.*$ no-jk SetEnvIfNoCase Request_URI ^/export/.*$ no-jk RewriteCond %{REQUEST_URI} !^/opencms/resources/.*$ RewriteCond %{REQUEST_URI} !^/export/.*$ RewriteCond %{REQUEST_URI} !^/opencms/webdav.*$ RewriteRule !^/opencms/opencms/(.*)$ /opencms/opencms%{REQUEST_URI} [PT] RewriteCond %{REQUEST_URI} ^/export/.*$ RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_FILENAME}/index_export.html" !-f RewriteRule .* http://%{HTTP_HOST}/opencms/opencms/hand404?exporturi=%{REQUEST_URI}&%{QUERY_STRING} RewriteCond %{REQUEST_URI} ^/opencms/resources/.*$ RewriteRule ^/opencms/(.*)$ /$1 ErrorLog logs/www.techwest.com-error_log CustomLog logs/www.techwest.com-access_log common AddType application/x-httpd-php .php ServerAdmin Brent.Seufert@techwest.com JkMount /* default </VirtualHost> |
||
|
|
Stranger
|
Hello! I have done everything like the Howto! I have the problem that when I change the value in the opencms-importexport from <vfs-prefix>{webapp-name}{servlet-name}</vfs-prefix> to <vfs-prefix></vfs-prefix>it is no longer possible to login into opencms! I can see the login screen and it is possible to login but then ask me opencms again for login! When I don't change to value it is possible to log in but all links in opencms have still the prefix /opencms/opencms. Can somebody help me? |
||
|
|
Member
|
sounds like you have not exactly configured the virtual host in Apache or you have forgotten some /opencms/ in the opencms-system.xml please check your config. hth, Markus |
||
|
|
Stranger
|
Hello I recently installed the OpenCms 7.0.5. Before this version I had the 6.2.3 one working OK. I migrated all content from the 6.2.3 to the 7.0.5 and every think was OK. But I decided to follw this tutorial to get ride of the opencms/opencms from the path and to secure my site b using the https. After have done all the steps one of the problems I have is that the workplace seems to be misconfigured. The links on the right windows don't work and the top frame dissapeared. Is there some information about this problem. Please, I wold appreciate any help or suggestion. Thanks in advance Katherin |
||
|
|
Stranger
|
Hi, I've followed this tutorial (very helpful) and have 1 minor problem that I can't solve. I'm using OpenCms 7.0.5, Tomcat 5.5.25 & Apache 1.3.41 (shipped with Mac os x 10.4) The problem I'm seeing is that all links in the opencms workplace (folders etc) open in a new window. This also causes some of the dialogs such as user/group choosers to break. My apache config is as follows (without ssl)
Snippet from my opencms-system.xml
Snippet from my opencms-importexport.xml
Any hints greatly appreciated. |
||
|
|
[Show Printable Version of Thread] |