You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a detailed post on how to install and configure CHL on your system. As of now CHL is only officially available on Linux, but I am planning to port it to other operating systems as well if the interest is big enough. Otherwise you could of course make a port of it yourself, see contribute.
This is for those of you who use a distribution of Linux. A little knowledge on how to use the Terminal and how to navigate the filesystem might be a good thing to have in your bagage, although not required to follow this guide.
First you will want to enable CGI scripts in the Apache2 configuration file. Look through the file etc/apache2/apache2.conf until you find a line that says: "<Directory /var/www/>".
vim /etc/apache2/apache2.conf
Add the following inside of "<Directory /var/www/>":
Options +ExecCGI
AddHandler cgi-script .chl
This tells Apache to handle all files with the .chl ending as CGI scripts.
Now you will have to enable the CGI module as well.
Once you have downloaded the CHL source files you are ready to install CHL.
Go ahead and change to the CHL directory containing all of the source files you just downloaded using a Terminal.
cd CHL
Issue the following command to finish the installation process. (Make sure to run as root)
sudo make install
or for FastCGI:
sudo make TYPE=FCGI install
Set the variable PLUGINS to FALSE: PLUGINS=FALSE, if you do not want any plugins to be installed.
This will compile all the files inside 'core/', as well as any plugin files if not PLUGINS is set to FALSE, to their corresponding object files. The object files will then be smashed into a linked library ('libchl.so'), which is then copied into '/usr/lib/chl/.'. The standard CHL header 'chl.h' is also moved, to '/usr/include/chl/.'
Open file '/etc/apache2/sites-available/000-default.conf', alt. '/etc/apache2/sites-available/default' for editing.
vim /etc/apache2/sites-available/000-default.conf
Change the DirectoryIndex of <VirtualHost *:80> to include 'index.chl'
<virtualhost *:80>
ServerName domain.com
ServerAlias www.domain.com
# Index file and Document Root (where the public files are located)
DirectoryIndex home.html index.html index.chl
DocumentRoot /var/www
</virtualhost>
Restart Apache2 to enable changes
service apache2 restart
Now that you have successfully installed CHL on your system, learn how to use CHL here: tutorial, get started
As CHL is open-source, people are able to contribute with their own APIs, plugins and code which means that CHL is constantly upgraded and provided with new features. Do you have an idea for a new CHL feature and want to contribute?