Webserver December 10, 2015

Webserver Configuration

Apache

To configure Apache to work with PyKwiki, you'll need a virtual host entry for static files that points to the PyKwiki install.

For example, if your project directory is /home/hpotter/pykwiki/MyBlog, then a virtual host entry might appear as follows:

<VirtualHost *:80>
    ServerName www.myblog.com
    DocumentRoot "/home/hpotter/pykwiki/MyBlog/docroot/"
    ErrorDocument 404 /404.html
    <Directory "/home/hpotter/pykwiki/MyBlog/docroot/">
        RewriteEngine Off
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>
...
Remote Editing Tutorial December 10, 2015

Remote editing with Bit Torrent Sync

BitTorrent Sync is free software available from http://www.bittorrent.com/sync.

BT Sync Server Setup

  1. Download BT Sync for your server OS.
  2. Extract it somewhere

    $ cd /path/to/btsync
    $ tar -xvzf btsync_some_version.tar.gz
    
  3. Run the server

    $ cd btsync_some_version/
    $ sudo ./btsync
    
  4. Access the BT Sync web GUI: http://<your-domain>:8888.

  5. Add a PyKwiki project folder and copy the folder key.

BT Sync Client Setup

  1. Download and install BT Sync.
  2. Follow the BT Sync instruction to create a new directory and add the folder key generated in the BT Sync Server Setup step.

Webserver setup

  1. Configure your webserver to serve static files out of the BT Sync docroot folder. See Webserver for more information.
  2. Setup cron jobs to periodically cache and index the content from BT Sync source.
    # PyKwiki Caching Example Cron Jobs
    # ----------------------------------------------------------------
    # Cache just page content once per minute, very fast
    * * * * * pykwiki -b /path/to/btsync/project/folder/ cache -q
    # Cache everything (all pages and theme files) and rebuild the search index
    #   since this can take a little longer, run this every 5 minutes
    */5 * * * * pykwiki -b /path/to/btsync/project/folder/ cache -f
    
...