Cherokee is a free and open source web server. It is very lightweight, high performance, fast and flexible web server. It supports all the widespread technologies like FastCGI, SSL/TLS, PHP, CGI, SSI, virtual servers, authentication, compression, load balancing, reverse HTTP proxy etc. It comes with a web-based graphical administration interface which can be used to manage the server and the websites hosted.
In this tutorial, we will learn to install and use Cherokee web server on CentOS 7.
Cherokee can be installed on systems with a very little amount of RAM, as the requirement of RAM increase as the number of hosted websites and users increases. You will also need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user. All the required software dependencies will be installed in this tutorial.
Before installing any package it is recommended that you update the packages and repository using the following command.
yum -y install epel-releaseyum -y update
Now you will need to install Python if you don't have it installed. Most of the systems are already equipped with Python. You can check if your system has existing Python install, run the following command for same.
If you get the following output, you do not need to install Python, you can proceed further without installing Python.
[root@liptan-pc ~]# python -V
If you do not have Python installed, run the following command to install Python 2.6.
Once Python is installed, you will need the Development Tools package to compile and install Cherokee. Install the package using the following command.
yum -y groupinstall 'Development Tools'
Now you will need to install Git so that you can clone the repository in your system. Run the following command for same.
yum -y install git rrdtool
Now clone the Cherokee repository using the following command.
cd ~git clone http://github.com/cherokee/webserver.git
Now compile and install the web server using following commands.
cd webserver./autogen.shmakemake install
This command will automatically install the Cherokee web server to your server. Now run the following command to run admin panel and generate one-time login password for your Cherokee admin panel.
You should get an output similar to this.
[root@ip-172-31-24-93 webserver]# cherokee-admin
Cherokee Web Server 1.2.104 (May 6 2017): Listening on port 127.0.0.1:9090,
TLS disabled, IPv6 enabled, using epoll, 4096 fds system limit, max. 2041
connections, caching I/O, single thread
To configure the general settings of your web server click on General menu from the top menu bar.
In the Network settings tab you can configure the following options.
Enable IPv6 support: You can enable IPv6 support using the following option. For this option to work, the network controller of the server must be configured to enable IPv6 support.
SSL/TLS back-end: Choose the SSL/TLS support for the backend of the web server, the default option is OpenSSL.
Timeout: Choose the duration after which server will automatically disconnect all inactive clients.
Information Collection: Choose the tool to generate graphs about the uses. Recommended is that you choose RTDtool, if you disable this option then no graphs will be shown in the status tab. You can disable this option to save resources.
Upload Tracking: Track the uploading of the file so that the progress can be shown to the user.
In the Basics tab of default virtual server, you can configure the path of the document root. Default document root is /usr/local/var/www. In Directory Indexes, you can set the name of the file which is to loaded when the web site is loaded, fir example index.html, index.php. In Keep-alive option, you can choose whether to keep the connection alive as per each virtual server. In Max Upload Size choose the upload limit of the file size. The default option is unlimited.
In the Host Match tab, you can choose for which requests the website from this virtual server will be loaded. You can enter either FQDN (Fully Qualified Domain Names), wild card entries, regular expressions, IPs/Subnets, or a combination of methods that will be evaluated as a logical OR. For example, you can enter *.example.com and example.org. The website will now be accessible from all the subdomains of example.com as well as from example.org.
In the Behaviour tab you can choose how the server should handle the different requests.
In the Error Handler tab, you can set the error pages to be displayed for different types of error. For example, you can set a specific not found page for error 404.
In the Logging tab you can choose whether to write the errors or not and if you choose to write the error, then where to write it. You can choose to write the error in a file, you will need to provide the path. Default path for error log is /usr/local/var/log/cherokee.error and for access log is /usr/local/var/log/cherokee.access.
In the Security tab you can configure the SSL support for your virtual server.
In this tutorial, we have learned how to setup Cherokee server on CentOS 7. We also learned to configure the settings and virtual servers of the Cherokee web server.
Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with...
Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your...
User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading...