Monkey HTTP, an other compatible lightweight web server Raspberry Pi
Among the Web servers available on the Raspberry, found Apache, Nginx, Lighttpd and another may be less known : Monkey HTTP. Announced as high-performance, It has everything to please our Raspberry Pi !
In a previous article, I had talked about d’a comparison of the main servers. Nginx was coming out of the lot but a short head on Monkey HTTP. For those who want to try it, Here's how.
The approach is quite well explained on official site, so here is the French version.
- Monkey HTTP is not available on the official repository but since the introduction of the Bill. So you must add this repository to your distribution. Edit the file //etc/apt/sources.list and add the following line :
deb http://packages.monkey-project.com/primates_pi primates_pi hand
- Updating the system. It will include the new repository to install our web server :
apt-get update
- You can now install Monkey and Add plugins :
apt - get install monkey \ Monkey-liana \ Monkey-logger \ Monkey-dirlisting \ Monkey-cgi \ Monkey-fastcgi \ Monkey-mandril \ Monkey-cheetah \ Monkey-auth
During the installation, the system will tell you that you install unauthenticated packets, you will therefore have to answer Y which is not the default option.
- You have your web server installed and running :
root@raspberrypi:~ # ps - ef | grep monk www-data 30114 1 0 17:27 ? 00:00:00 /usr/sbin/monkey--daemon root 30125 29900 0 17:33 PTS/3 00:00:00 grep monk root@raspberrypi:~#
- By going to the port 2001 your raspberry, Here is the Nice welcome message :
- To add SSL support, You can run the following installation :
apt - get install monkey-polarssl libpolarssl0
- Now, This is to configure the server for our use. It is in the directory /etc/monkey and in the file Monkey.conf. You can set the General parameters of the server as the listening port, the timeouts, etc.
The default site is located in /etc/monkey/sites/default. It is in this file that you can configure the root of your site. - If you need a PHP support, You can use the php5-fpm wrapper. Once installed via apt - get, You must configure Monkey to manage the PHP file.
In the FASTCGI_SERVER block you add the lines :Serverpath/var/run/php5-fpm.sock MaxConnections 1
In the FASTCGI_LOCATION block you add the lines :
Locationname fcgitest ServerNames test_server1 KeepAlive On Match. * . php
Finally it is necessary to activate the FastCGI plugin. Edit the file /etc/monkey/plugins.load. Enable the line :
Load /usr/lib/monkey/monkey-fastcgi.so
You can now restart your service
restart service monkey
Monkey HTTP site offers a comparison between Nginx and Monkey on the Raspberry. The result gives (Obviously ?) an advantage to Monkey then may be I will use it for the next articles …