Install NGINX PHP-FPM di Ubuntu 18.04 LTS

Baru saja Ubuntu merilis versi LTS (Long Term Support) yaitu versi 18.04 dengan code name Bionic Beaver. Pada artikel ini akan dijelaskan untuk melakukan instalasi dan konfigurasi NGINX dan PHP-FPM agar dapat menjadi web server di versi Ubuntu terbaru ini. Langsung kita mulai saja yaaaaa.

 

Update Package

arisyi@web-server:~$ sudo apt update

Install NGINX

arisyi@web-server:~$ sudo apt install nginx

Check Service NGINX

arisyi@web-server:~$ systemctl status nginx

Check Listen Port NGINX

arisyi@web-server:~$ sudo netstat -tulpn

Check Browser

buka browser lalu masukkan IP server http://ipaddress/


Install PHP-FPM

arisyi@web-server:~$ sudo apt install php-fpm

Check Service PHP-FPM

arisyi@web-server:~$ systemctl status php7.2-fpm.service

Config NGINX for PHP

tambahkan baris dibawah ini pada config NGINX didalam server {}

arisyi@web-server:~$ sudo nano /etc/nginx/sites-enabled/default
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        }

Create File .php

arisyi@web-server:~$ sudo nano /var/www/html/rcn.php

Check Browser

buka browser lalu masukkan IP server http://ipaddress/rcn.php

Sekian tutorial instalasi NGINX dan PHP-FPM di Ubuntu 18.04 LTS.

 

 

About the author
arisyi

Routecloud Networks

Information about Server, Linux and Computer Network.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Routecloud Networks.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.