to Home posted 19/02/2013 in Snippet about 1 minute read

OrangeHRM on nginx

I started evaluating OrangeHRM as a central HRM application for a company I’m about to start working in, but unfortunately there was no working example published (that I know of) of the PHP app working with nginx. So after some tinkering with it, I somehow put together an nginx setup that appears to be working.

server {
listen 80;
server_name #servername;
access_log #path;
error_log #path;
root #path;

index index.html index.htm index.php;
expires off;

location ~ ^(.+\.php)(.*)$ {
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param HTTPS off;
fastcgi_pass unix:/var/run/php5-fpm.sock;

location / {
index index.php;
try_files $uri /index.php?$args;

Replace the #servername and #path blocks with appropriate entries based on your needs. However I’m in the very early stages of testing so I’m not 100% sure the config is correct.

~ the end ~

to Home posted 19/02/2013 in Snippet


blog comments powered by Disqus

More reading