Setup for Web IRC using CGIIRC

Install CGIIRC

apt-get install cgiirc   
//We want apt to try and have packages easily updatable.

mkdir -p /srv/webirc 
ln -s /var/www/cgiirc /srv/webirc/public_html
ln -s /usr/lib/cgi-bin /srv/webirc/public_html/cgi-bin

Configure Apache2

There was fastcgi already on the server for moinmoin, however cgiirc didnt like fcgi. As a result the cgi apache module had to be enabled

a2enmod cgi

Next - onto apache2 vhosts

Make sure you have read the above Guidelines for Apache2 Vhosts.

vi /etc/apache2/sites-available/
<VirtualHost *:80>
        ErrorDocument 403
        DocumentRoot /srv/webirc/public_html/

<VirtualHost *:443>
        DocumentRoot /srv/webirc/public_html
        ScriptAlias /cgi-bin/ /srv/webirc/public_html/cgi-bin/

        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
        SSLEngine On
        SSLCertificateFile /etc/ssl/certs/


After authing against apache and pam, we force cgiirc to show username@server in IRC, instead of a hash of the clients UP.

Link to the [WWW] cgiirc mods in SVN to make life easier.

Edit htaccess Server Specific Configuration

vi /srv/webirc/public_html/.htaccess

DirectoryIndex index.html

AuthPAM_Enabled on
AuthType Basic
AuthName "Skynet Web IRC (please use your skynet username and password)"
Require valid-user
Order allow,deny
Allow from all

Tips and suggestions for people installing cgiirc.

  1. install cgiirc and get working WITHOUT auth or ssl

  2. Make sure your apache vhost is correct. If stuff doenst work - this is the reason.

  3. Be careful where to place the Auth section. Because of the iframe, Auth needs to be on the iframe target, and not the index.html container page. I chose to place auth details directly in the apache vhost in sites-enabled, rather than AllowOverride and having unnecessary htaccess files.

  4. If it helps - forget about the container and go straight to and test.

  5. Becareful of Updating. Proper diffs will be created.

More to come..

last edited 2012-02-03 23:35:09 by 089-101-247164