Wiki source code of Configuration

Version 28.1 by Ricardo Rodríguez on 2008/08/17

Hide last authors
Vincent Massol 1.1 1 1 Configuration
2
3 One you have XWiki [installed>Installation] you'll want to configure it. Configuration can be done in 2 ways:
Vincent Massol 1.12 4
Vincent Massol 1.1 5 * by stopping the XWiki instance and editing the ~~xwiki/WEB-INF/xwiki.cfg~~ file, and then restarting XWiki
TimL 1.19 6 * 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.
Vincent Massol 1.1 7
8 Note that some configurations are only accessible from the ~~xwiki.cfg~~ file and have no equivalent on the Administration page.
9
10 There are various things you can configure:
Vincent Massol 1.12 11
Vincent Massol 1.1 12 #toc("" "" "")
Vincent Massol 1.29 13
14 1.1 Enable superadmin account
15
16 Edit the <tt>xwiki.cfg</tt> file and enable the <tt>xwiki.superadminpassword</tt> property. For example:
17
18 {code:none}
19 # Enable to allow superadmin. It is disabled by default as this could be a security breach if
20 # it were set and you forgot about it.
21 xwiki.superadminpassword=system
22 {code}
23
Vincent Massol 4.1 24 When logging in, the username will be "superadmin" and the password will be the one you set in the <tt>xwiki.superadminpassword</tt> property.
25
Vincent Massol 12.2 26 1.1 Language settings
Vincent Massol 12.1 27
28 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.
29
Vincent Massol 12.2 30 In addition you can configure you wiki to be multilingual. See the [I18 user page>Features.I18N] for more information.
31
Vincent Massol 1.12 32 1.1 Wiki Access Configuration
33
34 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:
35
Vincent Massol 1.17 36 * [Open Wiki>#HOpenWiki]: anyone can edit pages (including non registered users)
Sergiu Dumitriu 6.3 37 * [Public Wiki>#HPublicWiki]: 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>xwiki:Main.Download]).
Vincent Massol 1.17 38 * [Private Wiki with password>#HPrivateWikiwithpassword]: registration is closed
39 * [Private Wiki with token for registering>#HPrivateWikiwithtoken]: registration is closed but users knowing the token can register
Vincent Massol 1.12 40
41 1.1.1 Open Wiki
42
43 TODO
44
45 1.1.1 Public Wiki
46
47 TODO
48
49 1.1.1 Private Wiki with password
TimL 1.20 50 1.1.1.1 Global rights
Vincent Massol 1.12 51
TimL 1.21 52 In [Global rights>http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globalrights&global=1] set *User:XWikiGuest, Groups:, Level:register, Allow-Deny:Allow*.
TimL 1.20 53
54 1.1.1.1 Registration
55
TimL 1.21 56 In [Preferences>http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences] under *Registration* set *Use email verification:yes*. fill the other fields appropriately.
TimL 1.20 57
Vincent Massol 1.12 58 1.1.1 Private Wiki with token
59
60 TODO
61
TimL 1.20 62
Vincent Massol 1.1 63 1.1 Enabling/Disabling Statistics
64
Vincent Massol 6.1 65 To disable [the Statistics feature>code:Applications.StatisticsApplication], edit your ~~xwiki.cfg~~ file and replace the following properties as shown here:
Vincent Massol 1.12 66 {code:xml}
Vincent Massol 1.1 67 xwiki.stats=0
68 xwiki.stats.default=0
69 {code}
70
Vincent Massol 1.10 71 where:
Vincent Massol 1.12 72
Vincent Massol 1.10 73 * ~~xwiki.stats~~ controls whether Statistics are on or off
74 * ~~xwiki.stats.default~~ controls whether Statistics are on or off by default for the current Wiki. This is useful in [Virtual Wiki mode>AdminGuide.Virtualization]. 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.
Vincent Massol 1.1 75
Vincent Massol 1.10 76 To enable Statistics, change "0" to "1".
77
Artem Melentyev 12.3 78 1.1 Optional Store Features
79
Artem Melentyev 12.4 80 XWiki stores all document attachment versions by default. This is very memory consuming (both RAM and HDD).
81 If you need only latest versions of attachments, you can disable attachment version control by editing your ~~xwiki.cfg~~ and adding:
Artem Melentyev 12.3 82 {code:xml}
83 xwiki.store.attachment.versioning=0
84 {code}
85
Artem Melentyev 12.4 86
Vincent Massol 1.4 87 1.1 Customizing the Skin
Vincent Massol 1.3 88
89 See the [Skin Guide>AdminGuide.Skins].
90
Vincent Massol 1.4 91 1.1 Security configuration
Vincent Massol 1.3 92
93 See the [Security Guide>AdminGuide.Security].
94
Vincent Massol 1.4 95 1.1 Customizing Menus
Vincent Massol 1.3 96
Vincent Massol 6.2 97 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>code:Applications.PanelsApplication] to provide the different menu panels you see on the left or right of your wikis. Check the [Panels Application>code:Applications.PanelsApplication] to know more on how to configure/modify them.
Vincent Massol 1.3 98
slauriere 1.5 99 1.1 Encoding
Vincent Massol 1.3 100
slauriere 1.5 101 See the [Encoding Guide>AdminGuide.Encoding].
102
Vincent Massol 1.6 103 1.1 User Authentication
slauriere 1.5 104
Vincent Massol 1.9 105 See the [Authentication Guide>AdminGuide.Authentication].
TimL 1.18 106
Vincent Massol 1.30 107 1.1 Customizing the registration page
108
109 The default registration page is defined as a template on the file system (named <tt>registerinline.vm</tt>). However it's possible to easily override it by creating a page named <tt>XWiki.Registration</tt>.
110
Vincent Massol 1.23 111 1.1 Logging
112
113 See the [Logging page>Logging].
114
Vincent Massol 1.24 115 1.1 Configuring Interwiki links
116
117 [Interwiki linking>http://en.wikipedia.org/wiki/InterWiki] 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\].
118
119 Since XWiki renders wiki syntax using the [Radeox>http://radeox.org] engine, it supports Interwiki links in [much the same way as SnipSnap>http://snipsnap.org/space/InterWiki+HowTo].
120
121 To configure Interwiki links on your wiki:
122
123 * Create a file named <tt>\[location from where you start your container\]/conf/*intermap.txt*</tt>
124 * Fill <tt>intermap.txt</tt> with content like:
125 {code}
126 IMDB http://us.imdb.com/Title?
127 OpenWiki http://openwiki.com/?
128 SourceForge http://sourceforge.net/
129 TWiki http://twiki.org/cgi-bin/view/
130 Why http://clublet.com/c/c/why?
131 Wiki http://c2.com/cgi/wiki?
132 WikiPedia http://www.wikipedia.com/wiki/
133 {code}
134
135 You can of course add your own entries.
136
137 * Note that Radeox's parser for intermap.txt is [very fragile>http://snipforge.org/jira/browse/RADEOX-49]. A blank line at the bottom of the file is enough to make it fall over.
138 * Restart XWiki (you'll need to restart XWiki every time you change <tt>intermap.txt</tt>) and try out an Interwiki link.
139 * If it does not work, check your <tt>xwiki.log</tt> file. You'll see if <tt>conf/intermap.txt</tt> could not be found, or if there was an error parsing it.
140
Vincent Massol 1.26 141 1.1 Setting the default editor to use (Wiki or WYSIWYG)
142
Jean-Vincent Drean 20.1 143 Go the Administration screen, then click on the "General" icon and select the default editor to use, as shown on the following screenshot:
Vincent Massol 1.26 144
Vincent Massol 1.28 145 {image:defaulteditor.png}
Vincent Massol 1.26 146
Vincent Massol 7.1 147 1.1 Short URLs
148
Vincent Massol 7.2 149 It's possible to [configure XWiki so that is uses shorter URLs>Main.ShortURLs].
Vincent Massol 7.1 150
Thomas Mortagne 17.1 151 1.1 Configure the names of database schemas (since 1.6M1).
rssh 8.1 152
153 Sometimes, especially in enterprise environment, we need control names of database schemes, other than default.
154
155 * xwiki.db -- name of database scheme of main wiki.
Thomas Mortagne 17.1 156 * xwiki.db.prefix -- usefull mainly for [virtual wikies>Virtualization], 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.
rssh 8.1 157
Vincent Massol 9.1 158 1.1 Turning off comments or attachments
159
160 You need to change the XWiki.XWikiPreferences class like this:
161
Vincent Massol 9.2 162 * Go to <tt>\<server\>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=class</tt>
Vincent Massol 9.1 163 * Add a new property called <tt>showcomments</tt> (or <tt>showattachments</tt> for turning off attachments) of type String Class
Vincent Massol 9.2 164 * Go to <tt>\<server\>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=object&classname=XWiki.XWikiPreferences</tt> and write no in the <tt>showcomments</tt> (or <tt>showattachments</tt>) field
Vincent Massol 9.1 165
166 That's it, the comments (or attachments) are gone. If you want to re-enable them, replace the "no" value with "yes".
167
Artem Melentyev 16.1 168 1.1 Configure edit comment behavior
169
170 When page editing you can add a comment of changes in special comment field by default (Look at [Features.PageEditing#HCommoneditactions]).
171 You can disable this feature by set ~~xwiki.editcomment=0~~ in ~~xwiki.cfg~~.
172
173 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.
174 If you want a popup, but want to be able to set empty edit comment, set ~~xwiki.editcomment.suggested=1~~ in ~~xwiki.cfg~~
175
176 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.
177
178 You can use the special fields in ~~XWikiPreferences~~ object instead of edit ~~xwiki.cfg~~.
179 These fields are: ~~editcomment~~, ~~editcomment_mandatory~~, ~~editcomment_suggested~~ and ~~editcomment_hidden~~.
180
Vincent Massol 10.1 181 1.1 Configuring the SMTP server
182
183 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.
184
Jean-Vincent Drean 20.1 185 To configure these go to the Administration page (<tt>http://\<server\>/xwiki/bin/admin/XWiki/XWikiPreferences</tt>), click on the "general" icon and modify the <tt>Admin email</tt> field to set the email under which XWiki emails will be sent and modify the <tt>Outgoing SMTP Server</tt> field to set the SMTP server to use, as shown on the figure below.
Vincent Massol 10.1 186
187 {image:emailconfiguration.png}
188
daning 14.1 189 #warning("Now xwiki can't configure password for SMTP user. Hence, you should use a SMTP server without password Authentication.")
190
Vincent Massol 13.1 191 1.1 Redirections
192
193 XWiki supports defining redirections for incoming requests. To activate this feature modify your <tt>xwiki.cfg</tt> file and set the following property:
194 {code:none}
195 xwiki.preferences.redirect=1
196 {code}
197
198 Then for each redirection you want to add, add a <tt>XWiki.GlobalRedirect</tt> object to your main wiki's <tt>XWiki.XWikiPreferences</tt> document. The <tt>XWiki.GlobalRedirect</tt> object has 2 fields: <tt>pattern</tt> and <tt>destination</tt>. The URL received is matched on <tt>pattern</tt> and if there's a match it's replaced with the value from <tt>destination</tt>. XWiki then redirects to the new URL.
199
Vincent Massol 15.2 200 1.1 Customizing the PDF export Look & Feel
Vincent Massol 15.1 201
Ricardo Rodríguez 27.1 202 It is posible to pass a pdftemplate parameter to the export process as in <tt>http://yourserver/xwiki/bin/export/Space/Page?format=pdf&language=en&pdftemplate=XWiki.PDFTemplate</tt>. XWiki.PDFTemplate is an instance of a newly created class PDFclass with <tt>style</tt> as only property. <tt>style</tt> stores CSS code. Don't add blank line between the rules. The field is parsed and rendered, so a blank line causes a paragraph to appear there, which breaks the CSS.
Ricardo Rodríguez 24.1 203
Ricardo Rodríguez 28.1 204 You must use this...
205
206 {code}
207 h2 {
208 margin-left: 2cm;
209 margin-bottom: 1cm;
210 color: red;
211 }
212 h3 {
213 margin: 3cm;
214 color: yellow;
215 }
216 {code}
217
218 And not...
219
220 {code}
221 h2 {
222 margin-left: 2cm;
223 margin-bottom: 1cm;
224 color: red;
225 }
226
227 h3 {
228 margin: 3cm;
229 color: yellow;
230 }
231 {code}
232
233
Ricardo Rodríguez 27.1 234 Even though RTF export is expected to work the same way, there are still some isues to be solved affecting how css properties control the final layout.
235
Ricardo Rodríguez 28.1 236 A new rendering subsystem is on its way, so things could change in the following few weeks. You may want keep an eye on [the new rendering architecture page>http://dev.xwiki.org/xwiki/bin/view/Design/NewRenderingArchitecture>new]. The diagram below summarizes the current process.
Ricardo Rodríguez 27.1 237
Ricardo Rodríguez 23.1 238 {image:XWikiExport200805192259.png}
Vincent Massol 15.1 239
Ricardo Rodríguez 23.1 240
Ricardo Rodríguez 24.1 241
Ricardo Rodríguez 25.1 242
Ricardo Rodríguez 26.1 243
Ricardo Rodríguez 27.1 244
Ricardo Rodríguez 28.1 245
TimL 1.18 246 1.1 Sample xwiki.cfg
247
Vincent Massol 1.22 248 {code}
249 xwiki.version=1.1-SNAPSHOT
250 xwiki.base=../../
251 xwiki.store.class=com.xpn.xwiki.store.XWikiHibernateStore
252 xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.xml
253 xwiki.store.hibernate.updateschema=1
254 xwiki.store.hibernate.custommapping=1
TimL 1.19 255
Vincent Massol 1.22 256 \#\# Jcr Store configuration
257 \#xwiki.store.class=com.xpn.xwiki.store.jcr.XWikiJcrStore
258 \#xwiki.store.attachment.class=com.xpn.xwiki.store.jcr.XWikiJcrAttachmentStore
259 \#xwiki.store.versioning.class=com.xpn.xwiki.store.jcr.XWikiJcrPropertyVersioningStore
260 \#xwiki.store.jcr.mapping=WEB-INF/classes/jcrmapping.xml
261 \#xwiki.store.jcr.provider=com.xpn.xwiki.store.jcr.JackRabbitJCRProvider
262 \#xwiki.store.jcr.jackrabbit.repository.config=WEB-INF/classes/jackrabbit/repository.xml
263 \#xwiki.store.jcr.jackrabbit.repository.path=jackrabbitrepo
264 \#xwiki.store.jcr.jackrabbit.nodetypes.config=WEB-INF/classes/jackrabbit/nodetypes.cnd
265
266 xwiki.store.cache=1
267 xwiki.store.cache.capacity=100
268 xwiki.monitor=1
269
270 \# List of active plugins.
271 xwiki.plugins=com.xpn.xwiki.monitor.api.MonitorPlugin,\\
272 com.xpn.xwiki.plugin.calendar.CalendarPlugin,\\
273 com.xpn.xwiki.plugin.feed.FeedPlugin,\\
274 com.xpn.xwiki.plugin.ldap.LDAPPlugin,\\
275 com.xpn.xwiki.plugin.google.GooglePlugin,\\
276 com.xpn.xwiki.plugin.flickr.FlickrPlugin,\\
277 com.xpn.xwiki.plugin.mail.MailPlugin,\\
278 com.xpn.xwiki.plugin.packaging.PackagePlugin,\\
279 com.xpn.xwiki.plugin.query.QueryPlugin,\\
280 com.xpn.xwiki.plugin.svg.SVGPlugin,\\
281 com.xpn.xwiki.plugin.charts.ChartingPlugin,\\
282 com.xpn.xwiki.plugin.fileupload.FileUploadPlugin,\\
283 com.xpn.xwiki.plugin.image.ImagePlugin,\\
284 com.xpn.xwiki.plugin.captcha.CaptchaPlugin,\\
285 com.xpn.xwiki.plugin.userdirectory.UserDirectoryPlugin,\\
286 com.xpn.xwiki.plugin.usertools.XWikiUserManagementToolsImpl,\\
287 com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin,\\
288 com.xpn.xwiki.plugin.autotag.AutoTagPlugin
289
290 \# This parameter allows XWiki to operate in Hosting mode
291 \# allowing to create multiple wikis having their own database
292 \# and responding to different URLs
293 xwiki.virtual=0
294 xwiki.virtual.redirect=http://127.0.0.1:9080/xwiki/bin/Main/ThisWikiDoesNotExist
295
296 \# This parameter will activate the exo integration
297 xwiki.exo=0
298
299 xwiki.authentication=form
300 xwiki.authentication.validationKey=totototototototototototototototo
301 xwiki.authentication.encryptionKey=titititititititititititititititi
302 xwiki.authentication.cookiedomains=xwiki.com,wiki.fr
303 \# Comment if you want to enable logout only for /bin/logout/XWiki/XWikiLogout
304 xwiki.authentication.logoutpage=/[^/]+/logout/*
305
306 \# Stats configuration allows to globally activate/deactivate stats module
307 \# it is also possible to choose a different stats service to record
308 \# statistics separately from XWiki.
309 \# Note: Statistics are disabled by default for improved performances.
310 xwiki.stats=0
311 xwiki.stats.default=1
312 xwiki.stats.class=com.xpn.xwiki.stats.impl.XWikiStatsServiceImpl
313
314 xwiki.encoding=ISO-8859-1
315 xwiki.render.macromapping=1
316 xwiki.backlinks=1
317 xwiki.tags=1
318
319 \#\# Use edit comments
320 xwiki.editcomment=1
321 \#\# Hide editcomment field and only use JS
322 xwiki.editcomment.hidden=0
323 \#\# Make edit comment mandatory
324 xwiki.editcomment.mandatory=0
325 \#\# Make edit comment suggested (asks 1 time if the comment is empty. 1 shows one popup if comment
326 \#\# is empty. 0 means there is no popup. This setting is ignored is mandatory is set)
327 xwiki.editcomment.suggested=0
328
329 \# GraphViz plugin configuration. The GraphViz plugin is not configured by default.
330 \# To enable it, add "com.xpn.xwiki.plugin.graphviz.GraphVizPlugin" to the list of plugins
331 \# in the xwiki.plugins property.
332 \# Uncomment and set the locations of the Dot and Neato executables
333 \#xwiki.plugin.graphviz.dotpath=c:/Program Files/ATT/GraphViz/bin/dot.exe
334 \#xwiki.plugin.graphviz.neatopath=c:/Program Files/ATT/GraphViz/bin/neato.exe
335
336 xwiki.plugin.laszlo.baseurl=/openlaszlo/xwiki/
337 xwiki.plugin.laszlo.path=c:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/openlaszlo/xwiki/
338
339 xwiki.plugin.image.cache.capacity=30
340
341 xwiki.plugin.captcha=1
342
343 \#\# Personal config
344
345 \# Enable to allow superadmin. It is disabled by default as this could be a security breach if
346 \# it were set and you forgot about it.
347 \#xwiki.superadminpassword=system
348
349 xwiki.authentication.ldap=0
350 xwiki.authentication.ldap.server=172.29.116.202
351 xwiki.authentication.ldap.check_level=1
352 xwiki.authentication.ldap.port=389
353 xwiki.authentication.ldap.base_DN=dc=necf,dc=fr
354 xwiki.authentication.ldap.bind_DN=cn={0},cn=Users,dc=necf,dc=fr
355 xwiki.authentication.ldap.bind_pass={1}
356 xwiki.authentication.ldap.UID_attr=sAMAccountName
357 xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn
358
359 xwiki.authentication.unauthorized_code=200
360
361 \# This parameter will activate the sectional editing
362 xwiki.section.edit=1
363
364 \# Uncomment if you want to ignore requests for unmapped actions, and simply display the document
365 \# xwiki.unknownActionResponse=view
366
367 \#\# WYSIWYG Editor configuration
368
369 \# You can configure the toolbars you wish to see in the WYSIWYG editor by defining the
370 \# xwiki.wysiwyg.toolbars property.
371 \# When not defined it defaults to:
372 \# xwiki.wysiwyg.toolbars=texttoolbar, listtoolbar, indenttoolbar, undotoolbar, titletoolbar, \
373 \# styletoolbar, horizontaltoolbar, attachmenttoolbar, macrostoolbar, \
374 \# tabletoolbar, tablerowtoolbar, tablecoltoolbar, linktoolbar
375 \# The full list of toolbars includes the one defined above and the following ones:
376 \# subtoolbar, findtoolbar, symboltoolbar
377
378 \#\# Skin configuration
379
380 xwiki.defaultskin=albatross
381 xwiki.defaultbaseskin=albatross
382
383 {code}
384

Get Connected