Nginx: Instalasi Ubuntu 20.04 PHP8: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs) Created page with "Sumber: https://linuxize.com/post/how-to-install-php-8-on-ubuntu-20-04/ ==Tambahkan Repository== sudo apt install software-properties-common sudo add-apt-repository ppa:o..." |
Onnowpurbo (talk | contribs) |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
==Tambahkan Repository== | ==Tambahkan Repository== | ||
sudo apt install software-properties-common | sudo apt -y install software-properties-common | ||
sudo add-apt-repository ppa:ondrej/php | sudo add-apt-repository ppa:ondrej/php | ||
sudo apt update | sudo apt update | ||
==Install Nginx== | |||
sudo su | |||
apt update | |||
apt -y install nginx | |||
==Install== | ==Install== | ||
sudo apt update | sudo apt update | ||
sudo apt install php8.0-fpm | sudo apt -y install php8.0-fpm | ||
Cek | Cek | ||
| Line 19: | Line 25: | ||
==Tambahkan di Konfigurasi Nginx== | |||
Edit file /etc/nginx/sites-enabled/default | |||
| Line 36: | Line 43: | ||
} | } | ||
} | } | ||
==Referensi== | ==Referensi== | ||
* https://linuxize.com/post/how-to-install-php-8-on-ubuntu-20-04/ | * https://linuxize.com/post/how-to-install-php-8-on-ubuntu-20-04/ | ||
Latest revision as of 22:21, 9 December 2020
Sumber: https://linuxize.com/post/how-to-install-php-8-on-ubuntu-20-04/
Tambahkan Repository
sudo apt -y install software-properties-common sudo add-apt-repository ppa:ondrej/php sudo apt update
Install Nginx
sudo su apt update apt -y install nginx
Install
sudo apt update sudo apt -y install php8.0-fpm
Cek
systemctl status php8.0-fpm
Tambahkan di Konfigurasi Nginx
Edit file /etc/nginx/sites-enabled/default
server {
# . . . other code
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
}