Using an Existing Apache Webserver (UNIX-type Platforms)

By default, Urchin 5 administration and reporting are done using a standalone Apache server that is bundled with the Urchin product. In the vast majority of Urchin installations, this is the preferred method for delivering Urchin admin and reporting interfaces. However, in rare instances it may be necessary to utilize an existing Apache installation. This may be due to site requirements that a localized version of Apache be used throughout the organization, or that all web services be controlled via a single Apache configuration. The information below describes two different models that can be employed to meet these requirements.

DISCLAIMER: These modifications to the Urchin installation are unsupported and fall outside the scope of the standard Urchin free and paid support plans.

Option 1: Utilitizing an existing site-specific Apache httpd binary to run Urchin services as a separate instance

    Side effects:
    • Urchin upgrades that depend on features added and/or configuration changes to the bundled Apache may not work properly if the existing Apache binary doesn't support these changes/features.
  • Configuration changes
  •  
    • Ensure that your httpd includes support for the following modules:
        mod_access
        mod_cgi
        mod_dir
        mod_mime
    • Install Urchin 5 in the normal fashion, choosing the desired port for Urchin's admin and reporting interfaces to run on.
    • Once Urchin is installed, do the following:
        cd /path/to/urchin/bin
        ./urchinctl stop
        mv urchinwebd urchinwebd.orig
        ln -s /path/to/your/httpd urchinwebd
        ./urchinctl start
      

      This will start up a separate instance of Apache that uses your Apache binary, but runs independently from your standard web services.

Option 2: Running Urchin services from an existing Apache configuration



## Support for Urchin administration and reporting services

Listen [port#]
<VirtualHost [server-ip]:[port#]>
ErrorLog     /path/to/urchin-distribution/var/error.log
DocumentRoot /path/to/urchin-distribution/htdocs/
<Directory   /path/to/urchin-distribution/htdocs/>
   AddHandler cgi-script .cgi
   Options ExecCGI
   DirectoryIndex session.cgi
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>
</VirtualHost>
    Side effects:
    • The entire Urchin distribution must be owned by the same UID that httpd runs as.
    • The admin GUI cannot be used to change the port Urchin runs on.
    • Use the bin/urchinctl command with the -s argument exclusively to start/stop only the Urchin scheduler (urchind)
  • Configuration changes
    Add the following lines to your existing httpd.conf file. You will need to supply the IP address for your server, the port number for the Urchin to use, as well as the path to the location where you've installed Urchin 5.

Once these configuration changes have been made, perform the following tasks:

  • Change the ownership of the Urchin distribution to the UID that your Apache webserver runs as:
      chown -R apache-user /path/to/urchin/bin
    
    
  • Ensure that the Apache bundled with Urchin is stopped:
      cd /path/to/urchin/bin
      ./urchinctl -w stop
    
  • Restart your Apache server to enable Urchin reporting and administration
  • Edit your Urchin boot-time startup script(s) and replace any instances of
      urchinctl start
    

    with

      urchinctl -s start
    
    This will cause only the Urchin scheduler to be run at boot time, rather than both the scheduler and Apache server.