Sidehistorik
Indholdsfortegnelse |
---|
Every Site typically needs a lot of resources for styling, that being Images, JavaScript files, CSS Files etc etc.
You have several options for placing these:
In the filesystem below the Confluence Install
The is typically a bad idea as it required filesystem access to the Confluence server, and every upgrade removes the files backing them up to a zip file
In the filesystem outside the Confluence install
This is a better idea, as the upgrade does not touch the files, but 2 steps are required (and has to be repeated after upgrades):
Allow Tomcat to get files outsite the TOMCAT home
The server.xml file has to be changed adding the allowedLinked parameter:
Kodeblok |
---|
<Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true" allowLinking="true"> |
Making one or more SymLinks to the resources
This could be similar to:
Kodeblok |
---|
cd CONFLUENCE_HOME/confluence/ ln -s /data/staticresources staticressouces |
Hence, the resouces can be reached at http://www.mysite.dk/staticresources/mycss.css
Still, filesystemaccess and post-upgrade tasks are required
Advarsel |
---|
The symbolic link(s) should be removed before upgrading via the binary installer, as this see all files under the symlink as changed files in the installation. After upgrade, this symlink can be reestablished |
In a resource page or space
Why not place all the needed resources in a page or as pace in many resources will be needed - this can be for each space where they are needed, or a dedicated resource space.
Create a space or page called "resources" and attach all needed files to the space's homepage
This has several advantages, as it is 100% GUI reachable and upgrades does not affect the attachments it anyway.
Also, Attachement are version controlled, making changes, testing and possible rollbacks much easier
Do notice, that the space and the resources attached to the space has to be reachable to all users (maybe including anonymous also) - but You can include a custom redirect on the page or space home- and pages for users, see Using the Customware Redirection Plugin
This is a sample of my Resource Page for Mos-Eisley:
On a(nother) static Webserver
You could have the static files on another webserver, but this leaves out the niceness regarding versioning and 100% GUI styling.