Sunday, 20 November 2016

Instalasi Tirta ERP dengan NGINX sebagai Web Server

Status : Draft

Untuk panduan instalasi menggunakan Apache Web Server dapat dilihat di [1]

NGINX

Konfigurasi NGINX


Untuk konfigurasi virtual host :

/etc/nginx/sites-available/tirtaerp

server {
        server_name tirtaerp.np;
        root /webapps/tirta-erp/web;
        access_log /var/log/nginx/tirtaerp/access.log;
        error_log /var/log/nginx/tirtaerp/error.log;
        fastcgi_read_timeout 300s;
        location / {
                try_files $uri /index.php/$uri?$args;
        }
        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                if (!-f $document_root$fastcgi_script_name) {
                        return 404;
                }
                include fastcgi_params;
                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param   PATH_INFO               $fastcgi_path_info;
                fastcgi_param   KOHANA_ENV development;
                fastcgi_pass fpm;
        }
}

Buat symlink ke /etc/nginx/sites-enable/tirtaerp

Buat file /etc/nginx/conf.d/fpm.conf , yang berisi : 

upstream fpm {
        server unix:/run/php/php7.0-fpm.sock;
}

sudo /etc/init.d/php7.0-fpm
sudo service nginx restart

Referensi


  1. Instalasi dan Update, http://tirtaerp.openthinklabs.com/2015/01/instalasi-dan-update.html#more

No comments:

Post a Comment