Wiki source code of Configuration
Version 10.1 by Vincent Massol on 2008/02/13
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | 1 Configuration | ||
2 | |||
3 | One you have XWiki [installed>Installation] you'll want to configure it. Configuration can be done in 2 ways: | ||
4 | |||
5 | * by stopping the XWiki instance and editing the ~~xwiki/WEB-INF/xwiki.cfg~~ file, and then restarting XWiki | ||
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. | ||
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: | ||
11 | |||
12 | #toc("" "" "") | ||
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 | |||
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 | |||
26 | 1.1 Wiki Access Configuration | ||
27 | |||
28 | 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: | ||
29 | |||
30 | * [Open Wiki>#HOpenWiki]: anyone can edit pages (including non registered users) | ||
31 | * [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]). | ||
32 | * [Private Wiki with password>#HPrivateWikiwithpassword]: registration is closed | ||
33 | * [Private Wiki with token for registering>#HPrivateWikiwithtoken]: registration is closed but users knowing the token can register | ||
34 | |||
35 | 1.1.1 Open Wiki | ||
36 | |||
37 | TODO | ||
38 | |||
39 | 1.1.1 Public Wiki | ||
40 | |||
41 | TODO | ||
42 | |||
43 | 1.1.1 Private Wiki with password | ||
44 | 1.1.1.1 Global rights | ||
45 | |||
46 | In [Global rights>http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globalrights&global=1] set *User:XWikiGuest, Groups:, Level:register, Allow-Deny:Allow*. | ||
47 | |||
48 | 1.1.1.1 Registration | ||
49 | |||
50 | In [Preferences>http://localhost:8080/xwiki/bin/admin/XWiki/XWikiPreferences] under *Registration* set *Use email verification:yes*. fill the other fields appropriately. | ||
51 | |||
52 | 1.1.1 Private Wiki with token | ||
53 | |||
54 | TODO | ||
55 | |||
56 | |||
57 | 1.1 Enabling/Disabling Statistics | ||
58 | |||
59 | To disable [the Statistics feature>code:Applications.StatisticsApplication], edit your ~~xwiki.cfg~~ file and replace the following properties as shown here: | ||
60 | {code:xml} | ||
61 | xwiki.stats=0 | ||
62 | xwiki.stats.default=0 | ||
63 | {code} | ||
64 | |||
65 | where: | ||
66 | |||
67 | * ~~xwiki.stats~~ controls whether Statistics are on or off | ||
68 | * ~~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. | ||
69 | |||
70 | To enable Statistics, change "0" to "1". | ||
71 | |||
72 | 1.1 Customizing the Skin | ||
73 | |||
74 | See the [Skin Guide>AdminGuide.Skins]. | ||
75 | |||
76 | 1.1 Security configuration | ||
77 | |||
78 | See the [Security Guide>AdminGuide.Security]. | ||
79 | |||
80 | 1.1 Customizing Menus | ||
81 | |||
82 | 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. | ||
83 | |||
84 | 1.1 Encoding | ||
85 | |||
86 | See the [Encoding Guide>AdminGuide.Encoding]. | ||
87 | |||
88 | 1.1 User Authentication | ||
89 | |||
90 | See the [Authentication Guide>AdminGuide.Authentication]. | ||
91 | |||
92 | 1.1 Customizing the registration page | ||
93 | |||
94 | 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>. | ||
95 | |||
96 | 1.1 Logging | ||
97 | |||
98 | See the [Logging page>Logging]. | ||
99 | |||
100 | 1.1 Configuring Interwiki links | ||
101 | |||
102 | [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\]. | ||
103 | |||
104 | 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]. | ||
105 | |||
106 | To configure Interwiki links on your wiki: | ||
107 | |||
108 | * Create a file named <tt>\[location from where you start your container\]/conf/*intermap.txt*</tt> | ||
109 | * Fill <tt>intermap.txt</tt> with content like: | ||
110 | {code} | ||
111 | IMDB http://us.imdb.com/Title? | ||
112 | OpenWiki http://openwiki.com/? | ||
113 | SourceForge http://sourceforge.net/ | ||
114 | TWiki http://twiki.org/cgi-bin/view/ | ||
115 | Why http://clublet.com/c/c/why? | ||
116 | Wiki http://c2.com/cgi/wiki? | ||
117 | WikiPedia http://www.wikipedia.com/wiki/ | ||
118 | {code} | ||
119 | |||
120 | You can of course add your own entries. | ||
121 | |||
122 | * 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. | ||
123 | * Restart XWiki (you'll need to restart XWiki every time you change <tt>intermap.txt</tt>) and try out an Interwiki link. | ||
124 | * 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. | ||
125 | |||
126 | 1.1 Setting the default editor to use (Wiki or WYSIWYG) | ||
127 | |||
128 | Go the Administration screen, then click on the "Editing" accordion and select the default editor to use, as shown on the following screenshot: | ||
129 | |||
130 | {image:defaulteditor.png} | ||
131 | |||
132 | 1.1 Short URLs | ||
133 | |||
134 | It's possible to [configure XWiki so that is uses shorter URLs>Main.ShortURLs]. | ||
135 | |||
136 | #* | ||
137 | 1 . 1 Configure the names of database schemas. | ||
138 | |||
139 | (note - feature not yet committed and will be enabled in next release) | ||
140 | |||
141 | Sometimes, especially in enterprise environment, we need control names of database schemes, other than default. | ||
142 | |||
143 | * xwiki.db -- name of database scheme of main wiki. | ||
144 | * xwiki.virtual.db.prefix -- usefull only for [virtual wikies>Virtualization], where we have database scheme for each virtual wiki. This prefix is added to database scheme name after usial mapping between wiki names and schemes. | ||
145 | *# | ||
146 | |||
147 | 1.1 Turning off comments or attachments | ||
148 | |||
149 | You need to change the XWiki.XWikiPreferences class like this: | ||
150 | |||
151 | * Go to <tt>\<server\>/xwiki/bin/edit/XWiki/XWikiPreferences?editor=class</tt> | ||
152 | * Add a new property called <tt>showcomments</tt> (or <tt>showattachments</tt> for turning off attachments) of type String Class | ||
153 | * 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 | ||
154 | |||
155 | That's it, the comments (or attachments) are gone. If you want to re-enable them, replace the "no" value with "yes". | ||
156 | |||
157 | 1.1 Configuring the SMTP server | ||
158 | |||
159 | 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. | ||
160 | |||
161 | To configure these go to the Administration page (<tt>http://\<server\>/xwiki/bin/admin/XWiki/XWikiPreferences</tt>) 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. | ||
162 | |||
163 | {image:emailconfiguration.png} | ||
164 | |||
165 | 1.1 Sample xwiki.cfg | ||
166 | |||
167 | {code} | ||
168 | xwiki.version=1.1-SNAPSHOT | ||
169 | xwiki.base=../../ | ||
170 | xwiki.store.class=com.xpn.xwiki.store.XWikiHibernateStore | ||
171 | xwiki.store.hibernate.path=/WEB-INF/hibernate.cfg.xml | ||
172 | xwiki.store.hibernate.updateschema=1 | ||
173 | xwiki.store.hibernate.custommapping=1 | ||
174 | |||
175 | \#\# Jcr Store configuration | ||
176 | \#xwiki.store.class=com.xpn.xwiki.store.jcr.XWikiJcrStore | ||
177 | \#xwiki.store.attachment.class=com.xpn.xwiki.store.jcr.XWikiJcrAttachmentStore | ||
178 | \#xwiki.store.versioning.class=com.xpn.xwiki.store.jcr.XWikiJcrPropertyVersioningStore | ||
179 | \#xwiki.store.jcr.mapping=WEB-INF/classes/jcrmapping.xml | ||
180 | \#xwiki.store.jcr.provider=com.xpn.xwiki.store.jcr.JackRabbitJCRProvider | ||
181 | \#xwiki.store.jcr.jackrabbit.repository.config=WEB-INF/classes/jackrabbit/repository.xml | ||
182 | \#xwiki.store.jcr.jackrabbit.repository.path=jackrabbitrepo | ||
183 | \#xwiki.store.jcr.jackrabbit.nodetypes.config=WEB-INF/classes/jackrabbit/nodetypes.cnd | ||
184 | |||
185 | xwiki.store.cache=1 | ||
186 | xwiki.store.cache.capacity=100 | ||
187 | xwiki.monitor=1 | ||
188 | |||
189 | \# List of active plugins. | ||
190 | xwiki.plugins=com.xpn.xwiki.monitor.api.MonitorPlugin,\\ | ||
191 | com.xpn.xwiki.plugin.calendar.CalendarPlugin,\\ | ||
192 | com.xpn.xwiki.plugin.feed.FeedPlugin,\\ | ||
193 | com.xpn.xwiki.plugin.ldap.LDAPPlugin,\\ | ||
194 | com.xpn.xwiki.plugin.google.GooglePlugin,\\ | ||
195 | com.xpn.xwiki.plugin.flickr.FlickrPlugin,\\ | ||
196 | com.xpn.xwiki.plugin.mail.MailPlugin,\\ | ||
197 | com.xpn.xwiki.plugin.packaging.PackagePlugin,\\ | ||
198 | com.xpn.xwiki.plugin.query.QueryPlugin,\\ | ||
199 | com.xpn.xwiki.plugin.svg.SVGPlugin,\\ | ||
200 | com.xpn.xwiki.plugin.charts.ChartingPlugin,\\ | ||
201 | com.xpn.xwiki.plugin.fileupload.FileUploadPlugin,\\ | ||
202 | com.xpn.xwiki.plugin.image.ImagePlugin,\\ | ||
203 | com.xpn.xwiki.plugin.captcha.CaptchaPlugin,\\ | ||
204 | com.xpn.xwiki.plugin.userdirectory.UserDirectoryPlugin,\\ | ||
205 | com.xpn.xwiki.plugin.usertools.XWikiUserManagementToolsImpl,\\ | ||
206 | com.xpn.xwiki.plugin.zipexplorer.ZipExplorerPlugin,\\ | ||
207 | com.xpn.xwiki.plugin.autotag.AutoTagPlugin | ||
208 | |||
209 | \# This parameter allows XWiki to operate in Hosting mode | ||
210 | \# allowing to create multiple wikis having their own database | ||
211 | \# and responding to different URLs | ||
212 | xwiki.virtual=0 | ||
213 | xwiki.virtual.redirect=http://127.0.0.1:9080/xwiki/bin/Main/ThisWikiDoesNotExist | ||
214 | |||
215 | \# This parameter will activate the exo integration | ||
216 | xwiki.exo=0 | ||
217 | |||
218 | xwiki.authentication=form | ||
219 | xwiki.authentication.validationKey=totototototototototototototototo | ||
220 | xwiki.authentication.encryptionKey=titititititititititititititititi | ||
221 | xwiki.authentication.cookiedomains=xwiki.com,wiki.fr | ||
222 | \# Comment if you want to enable logout only for /bin/logout/XWiki/XWikiLogout | ||
223 | xwiki.authentication.logoutpage=/[^/]+/logout/* | ||
224 | |||
225 | \# Stats configuration allows to globally activate/deactivate stats module | ||
226 | \# it is also possible to choose a different stats service to record | ||
227 | \# statistics separately from XWiki. | ||
228 | \# Note: Statistics are disabled by default for improved performances. | ||
229 | xwiki.stats=0 | ||
230 | xwiki.stats.default=1 | ||
231 | xwiki.stats.class=com.xpn.xwiki.stats.impl.XWikiStatsServiceImpl | ||
232 | |||
233 | xwiki.encoding=ISO-8859-1 | ||
234 | xwiki.render.macromapping=1 | ||
235 | xwiki.backlinks=1 | ||
236 | xwiki.tags=1 | ||
237 | |||
238 | \#\# Use edit comments | ||
239 | xwiki.editcomment=1 | ||
240 | \#\# Hide editcomment field and only use JS | ||
241 | xwiki.editcomment.hidden=0 | ||
242 | \#\# Make edit comment mandatory | ||
243 | xwiki.editcomment.mandatory=0 | ||
244 | \#\# Make edit comment suggested (asks 1 time if the comment is empty. 1 shows one popup if comment | ||
245 | \#\# is empty. 0 means there is no popup. This setting is ignored is mandatory is set) | ||
246 | xwiki.editcomment.suggested=0 | ||
247 | |||
248 | \# GraphViz plugin configuration. The GraphViz plugin is not configured by default. | ||
249 | \# To enable it, add "com.xpn.xwiki.plugin.graphviz.GraphVizPlugin" to the list of plugins | ||
250 | \# in the xwiki.plugins property. | ||
251 | \# Uncomment and set the locations of the Dot and Neato executables | ||
252 | \#xwiki.plugin.graphviz.dotpath=c:/Program Files/ATT/GraphViz/bin/dot.exe | ||
253 | \#xwiki.plugin.graphviz.neatopath=c:/Program Files/ATT/GraphViz/bin/neato.exe | ||
254 | |||
255 | xwiki.plugin.laszlo.baseurl=/openlaszlo/xwiki/ | ||
256 | xwiki.plugin.laszlo.path=c:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/openlaszlo/xwiki/ | ||
257 | |||
258 | xwiki.plugin.image.cache.capacity=30 | ||
259 | |||
260 | xwiki.plugin.captcha=1 | ||
261 | |||
262 | \#\# Personal config | ||
263 | |||
264 | \# Enable to allow superadmin. It is disabled by default as this could be a security breach if | ||
265 | \# it were set and you forgot about it. | ||
266 | \#xwiki.superadminpassword=system | ||
267 | |||
268 | xwiki.authentication.ldap=0 | ||
269 | xwiki.authentication.ldap.server=172.29.116.202 | ||
270 | xwiki.authentication.ldap.check_level=1 | ||
271 | xwiki.authentication.ldap.port=389 | ||
272 | xwiki.authentication.ldap.base_DN=dc=necf,dc=fr | ||
273 | xwiki.authentication.ldap.bind_DN=cn={0},cn=Users,dc=necf,dc=fr | ||
274 | xwiki.authentication.ldap.bind_pass={1} | ||
275 | xwiki.authentication.ldap.UID_attr=sAMAccountName | ||
276 | xwiki.authentication.ldap.fields_mapping=name=sAMAccountName,last_name=sn,first_name=givenName,fullname=displayName,email=mail,ldap_dn=dn | ||
277 | |||
278 | xwiki.authentication.unauthorized_code=200 | ||
279 | |||
280 | \# This parameter will activate the sectional editing | ||
281 | xwiki.section.edit=1 | ||
282 | |||
283 | \# Uncomment if you want to ignore requests for unmapped actions, and simply display the document | ||
284 | \# xwiki.unknownActionResponse=view | ||
285 | |||
286 | \#\# WYSIWYG Editor configuration | ||
287 | |||
288 | \# You can configure the toolbars you wish to see in the WYSIWYG editor by defining the | ||
289 | \# xwiki.wysiwyg.toolbars property. | ||
290 | \# When not defined it defaults to: | ||
291 | \# xwiki.wysiwyg.toolbars=texttoolbar, listtoolbar, indenttoolbar, undotoolbar, titletoolbar, \ | ||
292 | \# styletoolbar, horizontaltoolbar, attachmenttoolbar, macrostoolbar, \ | ||
293 | \# tabletoolbar, tablerowtoolbar, tablecoltoolbar, linktoolbar | ||
294 | \# The full list of toolbars includes the one defined above and the following ones: | ||
295 | \# subtoolbar, findtoolbar, symboltoolbar | ||
296 | |||
297 | \#\# Skin configuration | ||
298 | |||
299 | xwiki.defaultskin=albatross | ||
300 | xwiki.defaultbaseskin=albatross | ||
301 | |||
302 | {code} |