Admin/SetupGuides/setupcgiirc

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/vhost-webirc.skynet.ie
-------------------------
<VirtualHost *:80>
        ServerName webirc.skynet.ie
        ServerAlias webirc.csn.ul.ie
        ErrorDocument 403 https://webirc.skynet.ie
        DocumentRoot /srv/webirc/public_html/
        ServerAdmin webmaster@skynet.ie
</VirtualHost>

<VirtualHost *:443>
        ServerName webirc.skynet.ie
        ServerAlias webirc.csn.ul.ie
        ServerAdmin webmaster@skynet.ie
        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/wiki.skynet.ie.pem
</VirtualHost>
---------------------------

Edit CGIIRC:

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

SSLRequireSSL
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 host.skynet.ie/cgi-bin/cgiirc/irc.cgi 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