Configuration
Configuration
One you have XWiki installed you'll want to configure it. Configuration can be done in 2 ways:
- by stopping the XWiki instance and editing the xwiki/WEB-INF/xwiki.cfg file, and then restarting XWiki
- by logging in as a user with admin rights and going to the Administration page (when using the XWiki 1.0 skin, there's a an "Administration" link in the top right corner of the screen - You can also go directly to http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences##). This allows to keep the Server running while making the changes.
Note that some configurations are only accessible from the xwiki.cfg file and have no equivalent on the Administration page.
There are various things you can configure:
Invalid macro parameters used for the [toc] macro. Cause: [Failed to validate bean: [must be greater than or equal to 1]]. Click on this message for details.
Enable superadmin account
Edit the xwiki.cfg file and enable the xwiki.superadminpassword property. For example:
# it were set and you forgot about it.
xwiki.superadminpassword=system
When logging in, the username will be "superadmin" and the password will be the one you set in the xwiki.superadminpassword property.
Language settings
To define the default language for your wiki go to the Administration page and in the Preferences tag locate the "Default Language" field and enter the language code for the language you wish to use. For example: "en" for English, "fr" for French, "de" for German, etc.
In addition you can configure you wiki to be multilingual. See the I18 user page for more information.
Date format
To define the date format used in the interfaces, go to Administration / General, locate the "Date format" field and enter the date format you wish to use. Examples:
Format | Result |
---|---|
MMMM dd, HH:mm | January 27, 12:27 |
yyyy/MM/dd, HH:mm | 2009/01/27, 12:27 |
dd/MM/yyyy, HH:mm | 27/01/2009, 12:27 |
More information about date formatting.
Wiki Access Configuration
The first thing you will want to do is configure a policy access for your wiki. Depending on what you intend to use your wiki for, you have several options:
- Open Wiki: anyone can edit pages (including non registered users)
- Public Wiki: only registered users can edit pages but registration is open to anyone. This is the default configuration of the default wiki (the wiki provided as a XAR on the download page).
- Private Wiki with password: registration is closed
- Private Wiki with token for registering: registration is closed but users knowing the token can register
Open Wiki
TODO
Public Wiki
TODO
Private Wiki with password
Global rights
In Global rights set User:XWikiGuest, Groups:, Level:register, Allow-Deny:Allow.
Registration
In Preferences under Registration set Use email verification:yes. fill the other fields appropriately.
Private Wiki with token
TODO
Enabling/Disabling Statistics
To disable the Statistics feature, edit your xwiki.cfg file and replace the following properties as shown here:
xwiki.stats.default=0
where:
- xwiki.stats controls whether Statistics are on or off
- xwiki.stats.default controls whether Statistics are on or off by default for the current Wiki. This is useful in Virtual Wiki mode. A wiki can decide whether Statistics is on/off by setting the "statistics" field in XWiki.XWikiPreferences. If no such field is defined the the default value xwiki.stats.default is used.
To enable Statistics, change "0" to "1".
Optional Store Features
XWiki stores all document attachment versions by default. This is very memory consuming (both RAM and HDD). If you need only latest versions of attachments, you can disable attachment version control by editing your xwiki.cfg and adding:
Customizing the Skin
See the Skin Guide.
Security configuration
See the Security Guide.
Customizing Menus
The first thing to understand is that menus depend on the skin you're using. If you're using the 1.0 skin it's likely you're using the Panels Application to provide the different menu panels you see on the left or right of your wikis. Check the Panels Application to know more on how to configure/modify them.
Encoding
See the Encoding Guide.
User Authentication
See the Authentication Guide.
Customizing the registration page
The default registration page is defined as a template on the file system (named registerinline.vm). However it's possible to easily override it by creating a page named XWiki.Registration.
See more details about configuring the registration page.
Logging
See the Logging page.
Configuring Interwiki links
Interwiki linking is a short hand syntax for linking to pages on other websites. For example, you could link to http://en.wikipedia.org/wiki/InterWiki just by typing [InterWiki@WikiPedia].
Since XWiki renders wiki syntax using the Radeox engine, it supports Interwiki links in much the same way as SnipSnap.
To configure Interwiki links on your wiki:
- Create a file named [location from where you start your container]/conf/intermap.txt
- Fill intermap.txt with content like:
OpenWiki http://openwiki.com/?
SourceForge http://sourceforge.net/
TWiki http://twiki.org/cgi-bin/view/
Why http://clublet.com/c/c/why?
Wiki http://c2.com/cgi/wiki?
WikiPedia http://www.wikipedia.com/wiki/
You can of course add your own entries.
- Note that Radeox's parser for intermap.txt is very fragile. A blank line at the bottom of the file is enough to make it fall over.
- Restart XWiki (you'll need to restart XWiki every time you change intermap.txt) and try out an Interwiki link.
- If it does not work, check your xwiki.log file. You'll see if conf/intermap.txt could not be found, or if there was an error parsing it.
Setting the default editor to use (Wiki or WYSIWYG)
Go the Administration screen, then click on the "General" icon and select the default editor to use, as shown on the following screenshot:
Short URLs
It's possible to configure XWiki so that is uses shorter URLs.
Configure the names of database schemas (since 1.6M1)
Sometimes, especially in enterprise environment, we need control names of database schemes, other than default.
- xwiki.db -- name of database scheme of main wiki.
- xwiki.db.prefix -- usefull mainly for virtual wikies, where we have database scheme for each virtual wiki. This prefix is added to database scheme name after usual mapping between wiki names and schemes.
Turning off comments or attachments
You need to change the XWiki.XWikiPreferences class like this:
- Go to /xwiki/bin/edit/XWiki/XWikiPreferences?editor=class
- Add a new property called showcomments (or showattachments for turning off attachments) of type String Class
- Go to /xwiki/bin/edit/XWiki/XWikiPreferences?editor=object&classname=XWiki.XWikiPreferences and write no in the showcomments (or showattachments) field That's it, the comments (or attachments) are gone. If you want to re-enable them, replace the "no" value with "yes".
Configure edit comment behavior
When page editing you can add a comment of changes in special comment field by default (Look at PageEditing). You can disable this feature by set xwiki.editcomment=0 in xwiki.cfg.
When edit comment feature is enabled, you also can set edit comment mandatory by set xwiki.editcomment.mandatory=1 in xwiki.cfg. This will show popup window with the request to set edit comment if there is no comment entered. It doesn't allow to set empty comment. If you want a popup, but want to be able to set empty edit comment, set xwiki.editcomment.suggested=1 in xwiki.cfg
If you set edit comment as mandatory or suggested, you can also remove comment field from page editing form and use only popup window for set edit comment. Set xwiki.editcomment.hidden=0 in xwiki.cfg to do this.
You can use the special fields in XWikiPreferences object instead of edit xwiki.cfg. These fields are: editcomment, editcomment_mandatory, editcomment_suggested and editcomment_hidden.
Configuring the SMTP server
If you're planning to use XWiki's feature that send emails you'll need to configure the SMTP server used and the email address under which XWiki will send emails.
To configure these go to the Administration page (http:///xwiki/bin/admin/XWiki/XWikiPreferences), click on the "general" icon and modify the Admin email field to set the email under which XWiki emails will be sent and modify the Outgoing SMTP Server field to set the SMTP server to use, as shown on the figure below.
Configuring WebDAV (since 1.7)
WebDAV support has been added to XWiki beginning from XWiki Enterprise 1.7. It is very important to note that WebDAV is enabled by default.
Securing WebDAV Server
XWiki's WebDAV implementation only supports Basic Access Authentication scheme for authenticating WebDAV clients. Because of this reason it is highly recommended that you employ a transport level security mechanism like SSL to protect your clients. You may consult your web application container's documentation to see how this can be achieved.
Disabling WebDAV
To disable WebDAV support in your XWiki server, simply edit your web.xml file and remove the url-mapping element for mapping webdav requests. The url-mapping element for WebDAV looks something like:
<servlet-name>webdav</servlet-name>
<url-pattern>/webdav/*</url-pattern>
</servlet-mapping>
Redirections
XWiki supports defining redirections for incoming requests. To activate this feature modify your xwiki.cfg file and set the following property:
Then for each redirection you want to add, add a XWiki.GlobalRedirect object to your main wiki's XWiki.XWikiPreferences document. The XWiki.GlobalRedirect object has 2 fields: pattern and destination. The URL received is matched on pattern and if there's a match it's replaced with the value from destination. XWiki then redirects to the new URL.
Customizing the PDF export Look & Feel
Here's how the PDF and RTF exports currently work:
As shown in the diagram you can customize 3 parts:
- The CSS used to render the content as PDF/RTF
- The XHTML2FO XSL transformation
- The FOP XSL transformation In order to provide your own customization you need to start by creating a new XWiki Class. To do that simply create a new page and edit it in Class mode (for ex: http:/yourserver.com/xwiki/bin/edit/XWiki/PDFClass?editor=class). Add the following Text Area properties as needed (they are all optional so you only need to define the ones you need to use):
- style: contains the CSS information that will be overriding the default pdf.css values.
- xhtmlxsl: contains the XHTML to FO XSL overriding the default one.
- fopxsl: contains the FOP to PDF/RTF XSL overriding the default one. Then create a new page (say XWiki.PDFTemplate) and add the XWiki.PDFClass object to it. Last use that page when calling the PDF/RTF export using the pdftemplate parameter as in http://yourserver/xwiki/bin/export/Space/Page?format=pdf&language=en&pdftemplate=XWiki.PDFTemplate.
Configuring Wiki Syntaxes
Starting with XWiki Enterprise 1.6 and above it's possible to configure the Wiki syntaxes that are available to the user. To do so edit the xwiki.cfg file and configure the xwiki.rendering.syntaxes property. It's a comma-separated list of syntax ids. For example:
Sample xwiki.cfg
xwiki.store.class=com.xpn.xwiki.store.XWikiHibernateStore
xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.xml
xwiki.store.hibernate.updateschema=1
xwiki.store.hibernate.custommapping=1
xwiki.store.cache=1
xwiki.store.cache.capacity=100
xwiki.store.migration=1
xwiki.monitor=1
# List of active plugins.
xwiki.plugins=\
com.xpn.xwiki.monitor.api.MonitorPlugin,\
com.xpn.xwiki.plugin.calendar.CalendarPlugin,\
com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin,\
com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin,\
com.xpn.xwiki.plugin.feed.FeedPlugin,\
com.xpn.xwiki.plugin.ldap.LDAPPlugin,\
com.xpn.xwiki.plugin.google.GooglePlugin,\
com.xpn.xwiki.plugin.flickr.FlickrPlugin,\
com.xpn.xwiki.plugin.mail.MailPlugin,\
com.xpn.xwiki.plugin.packaging.PackagePlugin,\
com.xpn.xwiki.plugin.query.QueryPlugin,\
com.xpn.xwiki.plugin.svg.SVGPlugin,\
com.xpn.xwiki.plugin.charts.ChartingPlugin,\
com.xpn.xwiki.plugin.fileupload.FileUploadPlugin,\
com.xpn.xwiki.plugin.image.ImagePlugin,\
com.xpn.xwiki.plugin.captcha.CaptchaPlugin,\
com.xpn.xwiki.plugin.userdirectory.UserDirectoryPlugin,\
com.xpn.xwiki.plugin.usertools.XWikiUserManagementToolsImpl,\
com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin,\
com.xpn.xwiki.plugin.autotag.AutoTagPlugin,\
com.xpn.xwiki.plugin.lucene.LucenePlugin,\
com.xpn.xwiki.plugin.diff.DiffPlugin,\
com.xpn.xwiki.plugin.rightsmanager.RightsManagerPlugin,\
com.xpn.xwiki.plugin.jodatime.JodaTimePlugin,\
com.xpn.xwiki.plugin.scheduler.SchedulerPlugin,\
com.xpn.xwiki.plugin.mailsender.MailSenderPlugin,\
com.xpn.xwiki.plugin.watchlist.WatchListPlugin, \
com.xpn.xwiki.wysiwyg.server.plugin.WysiwygPlugin
# [Since 1.6RC1] Defines the list of supported syntaxes
# Available syntaxes are:
# xwiki/1.0, xwiki/2.0, confluence/1.0, jspwiki/1.0, creole/1.0,
# mediawiki/1.0, xhtml/1.0, twiki/1.0
xwiki.rendering.syntaxes = xwiki/1.0, xwiki/2.0, confluence/1.0, jspwiki/1.0, creole/1.0, mediawiki/1.0, xhtml/1.0, twiki/1.0
# This parameter allows XWiki to operate in Hosting mode allowing to create
# multiple wikis having their own database and responding to different URLs
xwiki.virtual=0
xwiki.virtual.redirect=http://127.0.0.1:9080/xwiki/bin/Main/ThisWikiDoesNotExist
# This parameter will activate the eXo Platform integration
xwiki.exo=0
xwiki.authentication=form
xwiki.authentication.validationKey=totototototototototototototototo
xwiki.authentication.encryptionKey=titititititititititititititititi
xwiki.authentication.cookiedomains=xwiki.com,wiki.fr
# This allows logout to happen for any page going through the /logout/ action, regardless of the document or the servlet.
# Comment-out if you want to enable logout only for /bin/logout/XWiki/XWikiLogout
xwiki.authentication.logoutpage=(/[^/]+/|/)logout/*
# Stats configuration allows to globally activate/deactivate stats module (launch storage thread, register events...)
xwiki.stats=1
# When statistics are globally enabled, storage can be enabled/disabled by wiki using the XWikiPreference property "statistics".
# Note: Statistics are disabled by default for improved performances/space.
xwiki.stats.default=0
# It is also possible to choose a different stats service to record statistics separately from XWiki.
xwiki.stats.class=com.xpn.xwiki.stats.impl.XWikiStatsServiceImpl
xwiki.encoding=ISO-8859-1
xwiki.backlinks=1
xwiki.tags=1
# Use edit comments
xwiki.editcomment=1
# Hide editcomment field and only use Javascript
xwiki.editcomment.hidden=0
# Make edit comment mandatory
xwiki.editcomment.mandatory=0
# Make edit comment suggested (asks 1 time if the comment is empty.
# 1 shows one popup if comment is empty.
# 0 means there is no popup.
# This setting is ignored if mandatory is set
xwiki.editcomment.suggested=0
# GraphViz plugin configuration. The GraphViz plugin is not configured by default.
# To enable it, add "com.xpn.xwiki.plugin.graphviz.GraphVizPlugin" to the list of plugins
# in the xwiki.plugins property.
# Uncomment and set the locations of the Dot and Neato executables
#xwiki.plugin.graphviz.dotpath=c:/Program Files/ATT/GraphViz/bin/dot.exe
#xwiki.plugin.graphviz.neatopath=c:/Program Files/ATT/GraphViz/bin/neato.exe
xwiki.plugin.laszlo.baseurl=/openlaszlo/xwiki/
xwiki.plugin.laszlo.path=c:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/openlaszlo/xwiki/
xwiki.plugin.image.cache.capacity=30
xwiki.plugin.captcha=0
# Enable to allow superadmin. It is disabled by default as this could be a security breach if
# it were set and you forgot about it.
#xwiki.superadminpassword=system
#-------------------------------------------------------------------------------------
# LDAP
#-------------------------------------------------------------------------------------
#-# new LDAP authentication service
# xwiki.authentication.authclass=com.xpn.xwiki.user.impl.LDAP.XWikiLDAPAuthServiceImpl
#-# Turn LDAP authentication on - otherwise only XWiki authentication
#-# 0: disable
#-# 1: enable
# xwiki.authentication.ldap=1
#-# LDAP Server (Active Directory, eDirectory, OpenLDAP, etc.)
xwiki.authentication.ldap.server=127.0.0.1
xwiki.authentication.ldap.port=389
#-# LDAP login, empty = anonymous access, otherwise specify full dn
#-# {0} is replaced with the username, {1} with the password
xwiki.authentication.ldap.bind_DN=cn={0},department=USER,department=INFORMATIK,department=1230,o=MP
xwiki.authentication.ldap.bind_pass={1}
#-# Force to check password after LDAP connection
#-# 0: disable
#-# 1: enable
xwiki.authentication.ldap.validate_password=0
#-# only members of the following group will be verified in the LDAP
#-# otherwise only users that are found after searching starting from the base_DN
# xwiki.authentication.ldap.user_group=cn=developers,ou=groups,o=MegaNova,c=US
#-# [Since 1.5RC1, XWikiLDAPAuthServiceImpl]
#-# only users not member of the following group can autheticate
# xwiki.authentication.ldap.exclude_group=cn=admin,ou=groups,o=MegaNova,c=US
#-# base DN for searches
xwiki.authentication.ldap.base_DN=
#-# Specifies the LDAP attribute containing the identifier to be used as the XWiki name (default=cn)
# xwiki.authentication.ldap.UID_attr=cn
#-# [Since 1.5M1, XWikiLDAPAuthServiceImpl]
#-# Specifies the LDAP attribute containing the password to be used "when xwiki.authentication.ldap.validate_password" is set to 1
# xwiki.authentication.ldap.password_field=userPassword
#-# [Since 1.5M1, XWikiLDAPAuthServiceImpl]
#-# The potential LDAP groups classes. Separated by commas.
# xwiki.authentication.ldap.group_classes=group,groupOfNames,groupOfUniqueNames,dynamicGroup,dynamicGroupAux,groupWiseDistributionList
#-# [Since 1.5M1, XWikiLDAPAuthServiceImpl]
#-# The potential names of the LDAP groups fields containings the members. Separated by commas.
# xwiki.authentication.ldap.group_memberfields=member,uniqueMember
#-# retrieve the following fields from LDAP and store them in the XWiki user object (xwiki-attribute=ldap-attribute)
#-# ldap_dn=dn -- dn is set by class, caches dn in XWiki.user object for faster access
xwiki.authentication.ldap.fields_mapping=last_name=sn,first_name=givenName,fullname=fullName,email=mail,ldap_dn=dn
#-# [Since 1.3M2, XWikiLDAPAuthServiceImpl]
#-# on every login update the mapped attributes from LDAP to XWiki otherwise this happens only once when the XWiki account is created.
xwiki.authentication.ldap.update_user=1
#-# [Since 1.3M2, XWikiLDAPAuthServiceImpl]
#-# mapps XWiki groups to LDAP groups, separator is "|"
# xwiki.authentication.ldap.group_mapping=XWiki.XWikiAdminGroup=cn=AdminRole,ou=groups,o=MegaNova,c=US|\
# XWiki.Organisation=cn=testers,ou=groups,o=MegaNova,c=US
#-# [Since 1.3M2, XWikiLDAPAuthServiceImpl]
#-# time in s after which the list of members in a group is refreshed from LDAP (default=3600*6)
# xwiki.authentication.ldap.groupcache_expiration=21800
#-# [Since 1.3M2, XWikiLDAPAuthServiceImpl]
#-# - create : synchronize group membership only when the user is first created
#-# - always: synchronize on every login
# xwiki.authentication.ldap.mode_group_sync=always
#-# [Since 1.3M2, XWikiLDAPAuthServiceImpl]
#-# if ldap authentication fails for any reason, try XWiki DB authentication with the same credentials
xwiki.authentication.ldap.trylocal=1
#-# [Since 1.3M2, XWikiLDAPAuthServiceImpl]
#-# SSL connection to LDAP server
#-# 0: normal
#-# 1: SSL
# xwiki.authentication.ldap.ssl=0
#-# [Since 1.3M2, XWikiLDAPAuthServiceImpl]
#-# The keystore file to use in SSL connection
# xwiki.authentication.ldap.ssl.keystore=
#-# [Since 1.5M1, XWikiLDAPAuthServiceImpl]
#-# The java secure provider used in SSL connection
# xwiki.authentication.ldap.ssl.secure_provider=com.sun.net.ssl.internal.ssl.Provider
#-------------------------------------------------------------------------------------
# Cache
#-------------------------------------------------------------------------------------
#-# [Since 1.5M2]
#-# The cache component implementation to use as "normal" (can be local or distributed depending on the implementation)
#-# cache component.
# xwiki.cache.cachefactory.hint=jbosscache
#-# [Since 1.5M2]
#-# The cache component to use as local cache component.
# xwiki.cache.cachefactory.local.hint=jbosscache/local
#-------------------------------------------------------------------------------------
xwiki.authentication.unauthorized_code=200
# This parameter will activate the sectional editing
xwiki.section.edit=1
# Uncomment if you want to ignore requests for unmapped actions, and simply display the document
# xwiki.unknownActionResponse=view
# You can configure the toolbars you wish to see in the WYSIWYG editor by defining the
# xwiki.wysiwyg.toolbars property.
# When not defined it defaults to:
# xwiki.wysiwyg.toolbars=texttoolbar, listtoolbar, indenttoolbar, undotoolbar, titletoolbar, \
# styletoolbar, horizontaltoolbar, attachmenttoolbar, macrostoolbar, \
# tabletoolbar, tablerowtoolbar, tablecoltoolbar, linktoolbar
# The full list of toolbars includes the one defined above and the following ones:
# subtoolbar, findtoolbar, symboltoolbar
xwiki.defaultskin=toucan
xwiki.defaultbaseskin=albatross
# Calendar Prev/Next Month bounds.
# The calendar generates links to the previous/next months for a limited range, by default 6 months back and 12 months after.
# A value of 0 means that there is no limit in that direction.
# xwiki.calendar.bound.prev=6
# xwiki.calendar.bound.next=12
# xwiki.temp.dir=/tmp/xwiki
# xwiki.work.dir=/usr/local/xwiki
# xwiki.plugins.lucene.indexdir=/usr/local/xwiki/lucene
# xwiki.plugins.lucene.analyzer=org.apache.lucene.analysis.standard.StandardAnalyzer
# xwiki.plugins.lucene.indexinterval=20
#-# [Since 1.6M1]
#-# Force the database name for the main wiki in virtual mode and for the wiki itself in non virtual mode
# xwiki.db=xwiki
#-# [Since 1.6M1]
#-# Add a prefix to all databases names of the wikis in virtual mode and to the wiki name in non virtual mode
# xwiki.db.prefix=
xwiki.work.dir=work