3.9. Setting up the software for a virtual host

To set up the software in an Apache virtual host, you must unpack the tklite inside the root directory of the LoT portal area, make that root directory the DocumentRoot of the Apache virtual host, and set up the TKL handler to invoke shell.php usng its path from that root.

As an example, if the LoT portal is installed in /home/lot, so that its web-visible root is /home/lot/root, then the TKL software must be installed within this area - for example, at /home/lot/root/tklite. Then, assuming the virtual host is named lot.org with IP address 1.2.3.4, the following Apache configuration could be used.


<VirtualHost 1.2.3.4>
  DocumentRoot /home/lot/root
  ServerName lot.org
  ErrorLog /home/lot/logs/error.log
  TransferLog /home/lot/logs/access.log

  <Directory  /home/lot/root>
    Options Indexes
    DirectoryIndex index.tkl index.php
    AcceptPathInfo On
    AddHandler tkl-handler .tkl

    # Path to shell.php is from the DocumentRoot
    Action tkl-handler /tklite/shell.php
  </Directory>
</VirtualHost>

	

Restart the web-server to make these changes take effect:


	  sudo /etc/rc.d/init.d/httpd restart