Differences

This shows you the differences between two versions of the page.

build:wiki [2010/03/03 15:07]
99.100.133.164 old revision restored
build:wiki [2010/08/02 22:49] (current)
Craig Buchek
Line 66: Line 66:
rm install.php index.php rm install.php index.php
</code> </code>
- 
===== Configuration ===== ===== Configuration =====
Copy the example configuration file to use as a base: Copy the example configuration file to use as a base:
-<code rootshell+ 
-cd /var/www/wiki.boochtek.com/ +<code bash
-cp conf/local.php.dist conf/local.php+sudo cd /var/www/wiki.boochtek.com/ 
 +sudo cp conf/local.php.dist conf/local.php
</code> </code>
Edit the ''conf/local.php'' file to look like this (make sure it doesn't have any blank lines outside the PHP tags): Edit the ''conf/local.php'' file to look like this (make sure it doesn't have any blank lines outside the PHP tags):
 +
<code php> <code php>
<?php <?php
Line 87: Line 88:
$conf['breadcrumbs'] = 1;          // Only show 1 previous page. $conf['breadcrumbs'] = 1;          // Only show 1 previous page.
$conf['htmlok'] = 1;               // Allow editing of raw HTML tags. $conf['htmlok'] = 1;               // Allow editing of raw HTML tags.
-$conf['usewordblock'] = 0;         // Don't block posts using "banned" words.+$conf['usewordblock'] = 1;         // Block posts using "banned" words, to reduce spam.
$conf['mailguard'] = 'visible';    // Use "name [at] domain [dot] com" format to display email addresses. $conf['mailguard'] = 'visible';    // Use "name [at] domain [dot] com" format to display email addresses.
$conf['typography'] = 0;           // Don't convert quotes to fancy version. $conf['typography'] = 0;           // Don't convert quotes to fancy version.
Line 100: Line 101:
Deactivate the automatic conversion of certain character combinations into different symbols since this destroys the ability to cut/paste commands and sample configuration data from the documentation.  For example, DokuWiki was converting ''--inet=1'' into ''&ndash;inet='' which resulted in a single dash when cut/pasted from the browser to another window, with the copied command failing. Deactivate the automatic conversion of certain character combinations into different symbols since this destroys the ability to cut/paste commands and sample configuration data from the documentation.  For example, DokuWiki was converting ''--inet=1'' into ''&ndash;inet='' which resulted in a single dash when cut/pasted from the browser to another window, with the copied command failing.
-<code rootshell+ 
-mv conf/entities.conf conf/entities.conf.out+<code bash
 +sudo mv conf/entities.conf conf/entities.conf.out
</code> </code>
 +
 +==== Spam Prevention ====
 +
 +We were getting a lot of spam on the wiki, so we enabled the wordblock feature, with blocklist updates downloaded from WikiMedia every day.
 +
 +<code bash>
 +sudo curl http://meta.wikimedia.org/wiki/Spam_blacklist?action=raw  2>/dev/null | grep -v '<pre>' > /var/www/wiki.boochtek.com/wordblock.conf
 +sudo rm /var/www/wiki.boochtek.com/dokuwiki-2009-12-25/conf/wordblock.conf
 +sudo ln -s ../../wordblock.conf /var/www/wiki.boochtek.com/dokuwiki-2009-12-25/conf/wordblock.conf
 +sudo sh -c 'cat > /etc/cron.daily/dokuwiki-spam-blocklist-download' <<EOF
 +# Back up the existing wordblock file.
 +cp /var/www/wiki.boochtek.com/wordblock.conf /var/www/wiki.boochtek.com/wordblock.conf.BAK
 +# Download the latest spam_blacklist from WikiMedia.
 +curl http://meta.wikimedia.org/wiki/Spam_blacklist?action=raw 2>/dev/null | grep -v '<pre>' > /var/www/wiki.boochtek.com/wordblock.conf
 +# If the file we downloaded is less than 10000 lines, revert to the backup.
 +if [ `wc -l /var/www/wiki.boochtek.com/dokuwiki-2009-12-25/conf/wordblock.conf | cut -d' ' -f1` -lt 10000 ] ; then
 +  mv /var/www/wiki.boochtek.com/wordblock.conf.BAK /var/www/wiki.boochtek.com/wordblock.conf
 +fi
 +EOF
 +sudo chmod +x /etc/cron.daily/dokuwiki-spam-blocklist-download
 +</code>
 +
===== Testing ===== ===== Testing =====
Line 199: Line 223:
rm -rf dokuwiki-$OLD_VERSION rm -rf dokuwiki-$OLD_VERSION
</code> </code>
 +===== ACLs and User Accounts =====
- +Since the wordblock feature didn't stop the spammers from changing our pages, we had to enable ACLs and logon accounts.
-===== TODO: Enable ACLs and User Accounts =====+
Create the conf/users.auth file: Create the conf/users.auth file:
-<code rootshell+ 
-touch conf/users.auth +<code bash
-chown www-data:www-data conf/users.auth +cd /var/www/wiki.boochtek.com/public 
-chmod 440 conf/users.auth+sudo touch conf/users.auth.php 
 +sudo chown www-data:www-data conf/users.auth.php 
 +sudo chmod 440 conf/users.auth.php
</code> </code>
Add an admin account in the file (replace $WIKI_ADMIN_PWD with real password): Add an admin account in the file (replace $WIKI_ADMIN_PWD with real password):
-  # echo "admin:`echo -n '$WIKI_ADMIN_PWD' | md5sum | awk '{print $1;}'`:Administrator:webmaster@sluug.org:admin,users" >> conf/users.auth 
-Create the conf/acl.auth file: +<code bash
-<code rootshell+sudo sh -c "echo admin:`echo -n $WIKI_ADMIN_PWD | md5sum | awk '{print \$1;}'`:Administrator:webmaster@sluug.org:admin,users >> conf/users.auth.php"
-cp conf/acl.auth.dist conf/acl.auth +
-chown www-data:www-data conf/acl.auth +
-chmod 440 conf/acl.auth+
</code> </code>
-Edit the conf/acl.auth file to look something look this+Create the ''conf/acl.auth.php'' file: 
-<code configfile+ 
-*               @admin  255 +<code bash
-*               @ALL    7 +sudo cp conf/acl.auth.dist conf/acl.auth.php 
-private:*       @admin  255 +sudo chown www-data:www-data conf/acl.auth.php 
-private:*       @ALL    0 +sudo chmod 440 conf/acl.auth.php
-readonly:*      @admin  255 +
-readonly:*      @ALL    1+
</code> </code>
 +Edit the ''conf/acl.auth.php'' file to look something look this:
 +<code configfile>
 +*               @ALL          1
 +*               @user         15
 +*               @admin        255
 +</code>
===== TODO ===== ===== TODO =====
-Accounts/ACLs. [[http://wiki.splitbrain.org/wiki:acl | See documentation]]. Set admin's password. +Consider changing these config values: fetchsize, registernotify, gzip_output, pluginmanager, hidepages, sitemap.
- +
-Turn on wordblock to ban edits with certain words (to prevent spamming and profanity)? +
-May not be necessary if we implement ACLs and require users to log in to make edits, +
-except for limited areas. +
- +
-See if we have the PHP GD extension and libgd2. (I think they might have been installed now, but it was tricky to keep them from installing the entire X library set.) +
- +
-Consider changing these config values: fetchsize, registernotify, gzip_output, pluginmanager, hidepages, sitemap+
See if there are any new configuration settings we should change. See if there are any new configuration settings we should change.
 
build/wiki.1267650468.txt.gz · Last modified: 2010/03/03 15:07 by 99.100.133.164
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki