Nginx
NGINX DEBIAN
Install the prerequisites:
sudo apt install curl gnupg2 ca-certificates lsb-release debian-archive-keyringImport an official nginx signing key so apt could verify the packages authenticity. Fetch the key:
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/nullVerify that the downloaded file contains the proper key:
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpgecho "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \http://nginx.org/packages/debian `lsb_release -cs` nginx" \ | sudo tee /etc/apt/sources.list.d/nginx.listSet up repository pinning to prefer our packages over distribution-provided ones:
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ | sudo tee /etc/apt/preferences.d/99nginxTo install nginx, run the following commands:
sudo apt updatesudo apt install nginxnginx -vConfiguration
systemctl start nginxsystemctl restart nginxsystemctl status nginxCek pada browser http://localhost atau http://ipaddress
server block
Maksudnya adalah setting konfigurasi untuk mengarahkan ke direktori tertentu, sehingga nantinya server bisa di isi banyak domain
Contoh