Date

Isso is an online comments system, similar to Disqus. The difference is that it's self-hosted, so there's no fee to pay, and nobody is data-mining your personal information.

My web-server hosts a number of different blogs, so Isso needs to handle comments for multiple virtual-hosts. The deployment instructions do mention Apache, but they seem to have been written by someone who has never actually done the job. The author is even humble enough to admit that the instructions may be incorrect.

After a bit of trial and error, I got it working very well. Here's how...

Install Isso

Isso isn't packaged for Debian 11, so I installed it as a regular user, inside a Python virtualenv. First install the necessary Debian packages:

$ sudo apt-get install python3-virtualenv python3-pip libapache2-mod-fcgid

Next create an installation directory that is writable by your user, and readable by everyone. Create a Python virtual environment there:

$ sudo mkdir /opt/isso
$ sudo chgrp USERS_GROUP /opt/isso
$ sudo chmod 775 /opt/isso
$ virtualenv /opt/isso

Then use pip to install the required Python packages. flup is the Python package required to write run_isso.fcgi - the glue code between FastCGI and WSGI - which is the interface Isso understands:

$ pip install isso
$ pip install flup

Set up files for VirtualHost

Here's how I arrange files for each of my virtual-hosts:

/PATH/TO/VIRTUAL-HOST/DIR/
  |
  +-- isso/
  |    |
  |    +-- data/ (writeable by www-data / Apache user)
  |    +-- isso.conf
  |    +-- run_isso.fcgi (executable)
  |
  +-- log/ (writeable by www-data / Apache user)
  |
  +-- www/

Each virtual-host has its own version of run_isso.fcgi and isso.conf. run_isso.fcgi contains the path to our new Python virtualenv, and to an Isso config file that is specific to the virtual host:

#!/opt/isso/bin/python

from isso import make_app, dist, config
import os

from flup.server.fcgi import WSGIServer

application = make_app(
    config.load(
        config.default_file(),
        "/PATH/TO/VIRTUAL-HOST/DIR/isso/isso.conf"
      )
  )
WSGIServer(application).run()

Configure Apache

Apache's mod_fcgid came pre-installed on Debian. I just needed to enable it with:

$ sudo a2enmod fcgid

Now, here is the corresponding VirtualHost in my Apache config:

<VirtualHost *:80>
    ServerName virtual.example.com

    DocumentRoot /PATH/TO/VIRTUAL-HOST/DIR/www
    <Directory "/PATH/TO/VIRTUAL-HOST/DIR/www/">
            AllowOverride All
            Require all granted
    </Directory>

    ScriptAlias /isso /PATH/TO/VIRTUAL-HOST/DIR/isso/run_isso.fcgi
    <Directory "/PATH/TO/VIRTUAL-HOST/DIR/isso">
            <Files "run_isso.fcgi">
                    Options ExecCGI
                    AllowOverride None
                    Require all granted
            </Files>
    </Directory>
    <Location "/isso">
             AcceptPathInfo On
    </Location>

    ErrorLog /PATH/TO/VIRTUAL-HOST/DIR/log/error.log
    LogLevel warn
    CustomLog /PATH/TO/VIRTUAL-HOST/DIR/log/access.log combined
    ServerSignature On
</VirtualHost>

Isso's root is http://virtual.example.com/isso. The "AcceptPathInfo On" setting tells Apache to pass any path beyond that into the run_isso.fcgi program. So for example, the admin interface is at http://virtual.example.com/isso/admin.

It all seems to work pretty well. Leave a comment (!) and tell me what you think.