EN  FR

Faster with HHVM and nginx

This tutorial is not for beginners and aims to help you to remember what are the major steps to install Jorani with nginx web server and Facebook Hip Hop virtual machine. Some steps such as installing the database or the software itself are omitted. In addition, I would suggest you to read the tutorial of installation with Apache.

We will explain how to install on Ubuntu 14.10. Please note that HHVM only works with 64-bit machines.

Get HHVM

HHVM comes in the form of source code or as pre-built packages. We will use the packages for Ubuntu 14.10.

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
sudo add-apt-repository 'deb http://dl.hhvm.com/ubuntu utopic main'
sudo apt-get update
sudo apt-get install hhvm

Configure HHVM

The page "report of the presence of an employee" uses cal_days_in_month PHP function that does not yet exist (at the time of this writing) in HHVM API. So we need to enable the Zend compatibility layer (in /etc/hhvm/php.ini) :

hhvm.enable_zend_compat = true

Start HHVM as FastCGI

HHVM executes PHP scripts and dialogues with your web server via FastCGI in a rather similar way to PHP-FPM. In this example, we will launch it so that it communicates with the web server via the network (it is also possible to use a socket if both servers are on the same machine).

hhvm --mode daemon -vServer.Type=fastcgi -vServer.Port=9010

If you encounter errors (segmentation fault, libgmp.so.10, libmemcachedutil.so.2), please read the documentation of HHVM project because many solutions are provided.

If you want to use Apache, you can find more information in the HHVM project documentation.

Configure nginx

A sample configuration is provided in the Jorani Github repository, but you need to adjust it according to your environment. For example, I change the line:

fastcgi_pass 127.0.0.1:9000;

in

fastcgi_pass 127.0.0.1:9010;

Since I launched HHVM on this network port.

Do not forget to configure your system so that nginx has the right permissions on the directory where you've installed Jorani.

Of course, you need to install and configure properly Jorani.


Tags :    tutorial   configure 

You may also like

Installing Jorani on Ubuntu server

How to install Jorani on Ubuntu? What is the default password? Here's a complete tutorial.   Read »

Delegate validation leave

A manager may temporarily or permanently entrusts with the validation of requests for leave to another employee, is the delegation.   Read »

How to change my password?

A user can change its password anytime. As explained into this article, you can do it in one click.   Read »

Contract List Management Page

Jorani allows you to create several types of contracts with different annual periods of leave and excluded leave types. This page allows you to choose the default leave type.   Read »

Modifying a submitted leave request

HR officer and manager can edit any leave request. This is useful if an employee made a mistake on a submitted leave request.   Read »

comments powered by Disqus