[opencms-dev] Resume and "Multiple Site without /opencms/opencms/" short how-to
Bernd Wolfsegger
bw at code-create.com
Wed Apr 13 09:14:42 CEST 2005
Hi alkacon and all,
just want to list all my unanswered questions and summarize all hints :)
The "Multiple Site without /opencms/opencms/" how-to is at the end.
1. Permission user interface:
Strange that there are checkboxes for allowed and denied, so I can set
both at the same time. But that makes no sense, does it?
If you set permissions for many users / groups there will be much
scrollwork todo ... Would be very very good to add some expand and fold
feature like above with the inherited permissions!!!
2. Unpublishing:
Would be nice to have a simple "unpublish" menuentry, like the "publish
directly" entry. I know something like "unpublishing" can be done per
"touch".
But I think it would be better when "unpublishing" would erase the published
file from the online project, and not just leaving it there and setting the
"Date expired" to a date earlier than the current date.
Thats no straight solution.
3. User Permissions and Menuentrys:
You define a group Editors with parentgroup Users and role Projectuser.
You define a user "tester" who is direct meber of this group and of group
Users (Last is neccessary because otherwise a user can not log in ...).
You log in as this new user.
You select a resource and edit this ressource.
You left click on the resource again after you finished editing and there is
the "Publish directly" entry available!
You click. You are asked whether you really want to publish etc...
"Finished link checking..." and eventually there is an exception thrown with
the text that this user hase no right to publish ... The last is very o.k.,
because this user had no rights.
But it would be much better if the entry "Publish directly" would not be
available in the first place. That would be less confusing for an editor.
Same with permission/denial to write. The entry is available, but there is a
bad exception thrown when clicking the edit entry.
4. Html Widget for xmlcontent:
This editor is very simple and it is bad that you can not decide on your own
if the HTML has to be cleaned or not.
It's very ugly and difficult to put some formatted text into this field, and
to perform changes inside this "WYSIWYG" text. Sometimes it does not behave
as you think it should.
Will there be an editor like the one for xmlpages in the final 6?
At least there should be a button for selecting internal documents to be
linked in the text (like for the xmlpage editor), and the possibility to
decide if the text is cleaned or not. To put links by hand into the next is
no solution for normal editors.
Thats really important, because as it is, it is not applicable for
professional use.
Content editors will work with this and not developers or HTML editors!
5. Links, popups and errors:
Would be nice to have a LinkHandler class like the LocaleHandler class, to do
link checking and formatting yourself.
Well, PopUpHandler and ErrorHandler would be nice too.
6. SSL:
Would be good, if SSL were possible without non-SSL-elements Error Messages in
the final release, working in the OpenCms system.
Many clients request to use such a system with SSL.
7. Error Handling:
Like it is handled now, there is now way to get hands on the Exception type
originally thrown, like with the errorpage tag.
Would be better if only static export relevant "not found" errors would be
handled nativly and all the other errors would come through to be handled by
the errorpage defined via errorpage tag.
Or there has to be some way to get hands on the originally thrown exception
type, message and stacktrace.
AND for now it is not possible to use a JSP as errorpage in "/system/handler/"
folder. It works only with plain text files.
8. Module defined Resourcetypes:
Would be nice, if it were possible to define default properties to show up
when creating a new resource, like it is possible for resources in the
workspace config file. Right now, the tag used for this is not allowed to be
used in the module config xml.
It's confusing, when this big screen with all available properties shows up by
default.
9. Properties:
What exactly is the difference between "individual" and "shared" properties.
Individual and shared related to WHAT? How does it behave when changing type,
copying etc.
10. SSL and sites
I have one site "/sites/www.mysite"
I have two domains www.mysite.com and www.mysite.de.
I like to have: the same content for both domains (both point to uri
"/sites/www.mysite") and https for both domains and secure selectable for
both domains.
But that is not yet possible with the current possible settings in the
opencms-system.xml and the displayed possibilities in the secure menu.
Because there is displayed only one domain for a resource below the uri.
I think there should show up all addresses that point to the uri and all
secure addresses defined for the uri (so there has to be one secure server per
alias) . And depending on the address(domain)
used for a request the according address(domain )for the secured resource
should be used in the generated links .
Well, I think that is what this secue functionality is ment for, to generate
https links?
11. Multi language content:
Well, thats a more luxory wish :)
Would be nice if it were possible to "publish" for each language content in
one xmlcontent resource separately.
12. SystemUser and WebUser and GuestUser:
The following scriptlet prints the following text into the log. I am logged in
as the administrator while requesting the JSP containing this scriptlet:
Scriptlet:
System.out.println("Test : " +
cms.getRequestContext().currentUser().isSystemUser() + ", " +
cms.getRequestContext().currentUser());
Logged:
Test : false, [User] name:Admin id:c300ba5c-01e8-3727-b305-5dcc9ccae1ee
flags:0 type:0 description:The admin user
Well, is user Admin no SystemUser? Who is SystemUser. I thought it is opposed
to the GuestUser/WebUser and describes all the Users which can log into the
System.
13. xmlcontent shemas, editform input errors:
Does not work correctly by now. the error in the input is recognized but no
message is displayed.
14. opencms.tld:
In Eclipse, using Lomboz, I get a parsing error for JSPs usinf OpenCms tags
(eg the contentload tag, param attribute):
"JSP parsing error: According to TLD or attribute directive in tag file,
attribute ... does not accept any expressions"
I looked into the opencms.tld. And for many tag attributes there is the
"rtexprvalue" not set, but you can use expressions obviously.
Well, is this an error of lomoboz, showing me this as an error, do I miss
something, or does "rtexprvalue" has to be set explicitely and else it is by
default "false"?
At least the servlet container seems to have no problems, since all works
well...
15. OpenCms top navigation and screen resolution:
There is not enough space for all possible buttons at 1024 x 768 resolution.
And there is no horizontal scrollbar if buttons vanish on the right side.
16. Synchronisation:
Every time tomcat is restarted, the synchronisation settings and the button
for starting the synchronisation process are gone and you have to define it
anew ...
"Multiple Site without /opencms/opencms/" short how-to/example/solution:
Tested with SuSE Linux 9.1, Tomcat 5.0.19-13, Apache 2.0.49-27.18.3, MySql
4.0.18-32.9.
Tomcat has to run standalone, no mod_jk is used in this solution
You have to have proper nameserver settings !!!
In this example I use named virtual hosts.
The used IP is:
192.168.0.5.
The used domains are:
opencms.mysite.com
www.mysite.com
opencms.mysite.com is the workplace server.
www.mysite.com is a site.
There can be more domains of course!
First:
Edit server.xml in your tomcat installation:
It has to have one proxy Connector entry for each domain!
And you have to have one standard Connector defined for 8080.
The port have to count up! Make sure there are no conflicts with ports already
used somewhere else!
There has to be an Engine entry with defaultHost localhost
There have to be at least these entrys, maybe there is more in the standard
server.xml like logging, realms etc.:
server.xml has to look like this:
<Server port="8005" shutdown="SHUTDOWN" debug="0">
.
. (Some standard stuff in between)
.
<Service name="Catalina">
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
<Connector port="8088" maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
proxyName="opencms.mysite.com" proxyPort="80"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
<Connector port="8089" maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
proxyName="www.mysite.com" proxyPort="80"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
disableUploadTimeout="true" />
<Engine name="Catalina" defaultHost="localhost" debug="0">
.
. (More standard stuff in between)
.
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Manager className="org.apache.catalina.session.StandardManager"
pathname="">
</Manager>
</Host>
</Engine>
</Service>
</Server>
Second:
The apache virtual hosts configuration:
You have to put the NamedVirtualHost directive inside your conf like this:
NameVirtualHost 192.168.0.5:80
And these are the virtual host configs.
You have to have one for each domain.
Make sure you use the corresponding ports as in the server.xml!!
You have to adjust the document root for your situation, but it has to end
with the webapps directory.
<VirtualHost 192.168.0.5:80>
ServerName opencms.mysite.com
ServerAdmin me at mysite.com
DocumentRoot "/srv/www/tomcat/developer/webapps/"
CustomLog /var/log/apache2/error_log error
CustomLog /var/log/apache2/access_log common
CustomLog /var/log/apache2/referer_log referer
CustomLog /var/log/apache2/agent_log agent
<Directory "/srv/www/tomcat/developer/webapps/">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ProxyPass /export/ http://localhost:8088/export/
ProxyPassReverse /export/ http://localhost:8088/export/
ProxyPass /resources/ http://localhost:8088/resources/
ProxyPassReverse /resources/ http://localhost:8088/resources/
ProxyPass /opencms/ http://localhost:8088/opencms/
ProxyPassReverse /opencms/ http://localhost:8088/opencms/
ProxyPass / http://localhost:8088/opencms/
ProxyPassReverse / http://localhost:8088/opencms/
</VirtualHost>
<VirtualHost 192.168.0.5:80>
ServerName www.mysite.com
ServerAdmin me at mysite.com
DocumentRoot "/srv/www/tomcat/developer/webapps/"
CustomLog /var/log/apache2/www_error_log error
CustomLog /var/log/apache2/www_access_log common
CustomLog /var/log/apache2/www_referer_log referer
CustomLog /var/log/apache2/www_agent_log agent
<Directory "/srv/www/tomcat/developer/webapps/">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ProxyPass /export/ http://localhost:8089/export/
ProxyPassReverse /export/ http://localhost:8089/export/
ProxyPass /resources/ http://localhost:8089/resources/
ProxyPassReverse /resources/ http://localhost:8089/resources/
ProxyPass /opencms/ http://localhost:8089/opencms/
ProxyPassReverse /opencms/ http://localhost:8089/opencms/
ProxyPass / http://localhost:8089/opencms/
ProxyPassReverse / http://localhost:8089/opencms/
</VirtualHost>
Third:
NOW, put the opencms.war file below the webapps directory.
Start tomcat and apache in this order.
Call http://opencms.mysite.com/opencms/setup/ in your browser.
Follow the steps and install normally.
Fourth:
After successful installation (was always successful in my case):
Stop tomcat and apache.
Rename the opencms.war below webapps directory to ROOT.war.
Rename the opencms folder below webapps directory to ROOT.
Edit the opencms-system.xml inside the sites tag it has to look loke this:
<sites>
<workplace-server>http://opencms.mysite.com</workplace-server>
<default-uri>/sites/default/</default-uri>
<site server="http://opencms.mysite.com" uri="/sites/default/"/>
<site server="http://www.mysite.com" uri="/sites/www.mysite/"/>
</sites>
Edit the opencms-importexport.xml inside the rendersettings tag it has to look
loke this:
<rendersettings>
<rfs-prefix>/export</rfs-prefix>
<vfs-prefix></vfs-prefix>
<userelativelinks>false</userelativelinks>
<exporturl>http://opencms.mysite.com/handle404</exporturl>
<plainoptimization>true</plainoptimization>
<testresource uri="/system/shared/page.dtd"/>
<resourcestorender>
<regex>/sites/.*</regex>
<regex>/system/galleries/.*</regex>
<regex>/system/modules/.*/resources/.*</regex>
</resourcestorender>
Thats it.
Start tomcat and start apache.
Call http://opencms.mysite.com/ in your browser and click the loginwindow link
on the OpenCms greetings page.
Well, you have to create a directory "/sites/www.mysite/" in the VFS and fill
it with whatever you need for your site.
I hope I forgot nothing.
I have installed and used this configuration with 6.0 beta 1 und beta 2
without any problems.
Your default apache and tomcat installation have to o.k. and not to be
tampered with.
Kind regards, Bernd Wolfsegger
--
[ Code Create
[ Information Technology & Architecture
[ Bernd Wolfsegger
[ Sun Certified Programmer for Java(TM) 2 Platform
[ Dipl.-Ing. Architekt
[ Office in Germany
[
[ Lohmeyerstrasse 13
[ 10587 Berlin
[ Germany
[ +49 (0)30 26555788
[ Office in Kenya
[
[ P.O. Box 890
[ V/Market
[ 00621 Nairobi
[ Kenya
[ +254 (0)720 481053
[ bw at code-create.de(com)
[ http://www.code-create.de(com)/
More information about the opencms-dev
mailing list