Table of Contents

DokuWiki with Mac OS X and Apache

Mac OS X client

Apache and PHP are pre-installed on Mac OS X client, but disabled by default. The following should work for Leopard (10.5.x), Tiger (10.4.x) and Panther (10.3.x) client (if there is no previous version of DokuWiki installed):

  1. Enable PHP in Apache and Allow Directory Accesses
    1. Backup httpd.conf:
      $ sudo cp /private/etc/apache2/httpd.conf /private/etc/apache2/httpd.conf.bak
    2. Edit httpd.conf:
      $ sudo pico /private/etc/apache2/httpd.conf
    3. Make the following changes to httpd.conf:
      • CHANGE:
        #LoadModule php5_module
      • TO:
        LoadModule php5_module 
  2. Download dokuwiki-yyyy-mm-dd.tgz (assuming to ~/Downloads)
  3. Unpack downloaded file, move to appropriate location, and change ownership:
    $ cd ~/Downloads && tar -zxvf dokuwiki-yyyy-mm-dd.tgz
    $ mv dokuwiki-yyyy-mm-dd ~/Sites/dokuwiki
    $ cd ~/Sites/dokuwiki
    $ sudo chown -R www data conf lib/plugins
  4. Start Personal Web Sharing in System Preferences → Sharing

You should now be able to run the installer at http://localhost/~your_username/dokuwiki/install.php

Mac OS X Server

For Tiger (10.4.x) and Panther (10.3.x) server:

  1. Mac OS Server has Apache and PHP pre-installed; they are enabled through the Server Admin application. Enable “php4_module” under Web → Modules, and start (or restart) and configure the web service.
  2. Download dokuwiki-yyyy-mm-dd.tgz (assuming to ~/Desktop)
  3. From the command line:
    $ cd ~/Desktop && tar -zxvf dokuwiki-yyyy-mm-dd.tgz
    $ mv dokuwiki-yyyy-mm-dd ~/Sites/dokuwiki
    $ cd ~/Sites/dokuwiki
    $ sudo chown -R www data conf

You should now be able to run the installer at http://localhost/dokuwiki/install.php

Notes

$conf['basedir']     = '/~yourusername/dokuwiki/';      //absolute dir from serveroot - blank for autodetection
$ cd ~/Sites/dokuwiki
$ chmod -R +a "group:www allow read,search,file_inherit,directory_inherit" .
$ chmod -R +a "group:www allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" {conf,data}
$ chmod -R +a "user:$(id -u -n) allow list,add_file,search,delete,add_subdirectory,delete_child,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" {conf,data}

What about MacPorts? Can anyone offer guidance there? (the MacPorts documentation is sparse on everything, so some help here would be nice) More Info

1) or change this line directly in the dokuwiki.php file
2) in the conf directory