[opencms-dev] multisite-configuration and export with exportname set to "/" not working

Chauhan, Amit Amit_Chauhan at intuit.com
Thu Apr 30 23:46:15 CEST 2009


Mark,

This is a know issue in OpenCMS, where you cannot specify same export point, even across different sites (which I think is a bug).
If you look at the logic of CmsAfterPublishStaticExportHandler and related classes, you'll find that OpenCMS is maintaining an internal mapping of RFS files to corresponding VFS folder paths in a Map.
So there would be a single key for the export path ("/" in your case) and hence it can map only to one VFS folder path.

Thanks
Amit Chauhan
650-944-3246 (desk)
510-449-3402 (cell)

-----Original Message-----
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Marc Johnen
Sent: Friday, April 17, 2009 10:43 AM
To: opencms-dev at opencms.org
Subject: [opencms-dev] multisite-configuration and export with exportname set to "/" not working


Hello everyone,

this is still the same problem as in my previous post, but now I describe it
better and I made a small test-case: 
I have two sites /site/default/ and /site/default2/, in both I put a single
file
index.html (using templatetwo). When I set the exportname on both
folders to "/", only the first one is being exported correctly  (This only
concerns template-resources, other ressources work fine).
If I set the exportname on either of the folders to "test" and the other
one to "/" everything works fine. The problem is, I NEED the exportname
to be "/" on both, because I have to remove the standard path (here
/site/default/ from all Links and the URL).
Below you can find the changes I made to the standard installation.
I installed opencms as ROOT and tried both a config with mod_proxy
or without.

I would be very greatful for any hints.
Thank you and greetings
Marc



opencms-importexport.xml:
		<rendersettings>
			<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
			<vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</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"/>
			<!--resourcestorender>
				<regex>/sites/.*</regex>
				<regex>/system/workplace/commons/style/.*</regex>
				<regex>/system/galleries/.*</regex>
				<regex>/system/modules/.*/resources/.*</regex>
			</resourcestorender-->


                       <resourcestorender>
                                <regex>/sites/default/.*</regex>
                                <regex>/sites/default2/.*</regex>
                               
<regex>/system/modules/org.opencms.frontend.templatetwo.demo/resources/.*</regex>
                               
<regex>/system/modules/org.opencms.frontend.templatetwo/resources/.*</regex>
				<regex>/system/workplace/commons/style/.*</regex>
                                <export-rules>
                                        <export-rule>
                                                <name>defaultName</name>
                                                <description>export rules
for defaultsite</description>
                                                <modified-resources>
                                                       
<regex>/sites/default/.*</regex>
                                                       
<regex>/system/modules/org.opencms.frontend.templatetwo.demo/.*</regex>
                                                       
<regex>/system/modules/org.opencms.frontend.templatetwo/.*</regex>
                                                </modified-resources>
                                                <export-resources>
                                                       
<uri>/sites/default/</uri>
                                                </export-resources>
                                        </export-rule>
                                        <export-rule>
                                                <name>default2Name</name>
                                                <description>export rules
for defaultsite2</description>
                                                <modified-resources>
                                                       
<regex>/sites/default2/.*</regex>
                                                       
<regex>/system/modules/org.opencms.frontend.templatetwo/.*</regex>
                                                </modified-resources>
                                                <export-resources>
                                                       
<uri>/sites/default2/</uri>
                                                </export-resources>
                                        </export-rule>
                                </export-rules>
                        </resourcestorender>
                        <rfs-rules>
                                <rfs-rule>
                                        <name>defaultNameRfsRule</name>
                                        <description>export rules for
defaultsite</description>
                                        <source>/sites/default/.*</source>
                                        <rfs-prefix></rfs-prefix>
                                       
<exportpath>/srv/tomcat/opencms7/www/defaultsite</exportpath>
                                       
<exportworkpath>/srv/tomcat/opencms7/www/work/defaultsite</exportworkpath>
                                       
<userelativelinks>false</userelativelinks>
                                        <related-system-res>
                                               
<regex>/system/modules/org.opencms.frontend.templatetwo.demo/resources/.*</regex>
                                               
<regex>/system/modules/org.opencms.frontend.templatetwo/resources/.*</regex>
                                        </related-system-res>
                                </rfs-rule>
                                <rfs-rule>
                                        <name>default2NameRfsRule</name>
                                        <description>export rules for
defaultsite2</description>
                                        <source>/sites/default2/.*</source>
                                        <rfs-prefix></rfs-prefix>
                                       
<exportpath>/srv/tomcat/opencms7/www/defaultsite2</exportpath>
                                       
<exportworkpath>/srv/tomcat/opencms7/www/work/defaultsite2</exportworkpath>
                                       
<userelativelinks>false</userelativelinks>
                                        <related-system-res>
                                               
<regex>/system/modules/org.opencms.frontend.templatetwo/resources/.*</regex>
                                        </related-system-res>
                                </rfs-rule>
                        </rfs-rules>




opencms-system.xml:
    <sites>
      <workplace-server>http://ocms:8080</workplace-server>
      <default-uri>/sites/default/</default-uri>
      <site server="http://ocms:8080" uri="/sites/default/"/>
      <site server="http://ocms:8081" uri="/sites/default2/"/>
    </sites>

server.xml is adjusted accordingly.
I also tried a config with mod_proxy using two working domain-names in the
opencms-system.xml.

-- 
View this message in context: http://www.nabble.com/multisite-configuration-and-export-with-exportname-set-to-%22-%22-not-working-tp23102485p23102485.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev


More information about the opencms-dev mailing list