Tutorial Debian 10 nginx
Tutorial Debian 10 nginx
# lsb_release -a
Release:10
Codename: buster
# ping -c 3 zonabiner.com
PING zonabiner.com (157.230.43.191) 56(84) bytes of data.
64 bytes from 157.230.43.191 (157.230.43.191): icmp_seq=1 ttl=50
time=101 ms
64 bytes from 157.230.43.191 (157.230.43.191): icmp_seq=2 ttl=50
time=58.2 ms
64 bytes from 157.230.43.191 (157.230.43.191): icmp_seq=3 ttl=50
time=59.3 ms
3. Instalasi Nginx
Untuk instalsi nginx sangat mudah yaitu dengan cukup mengetikan
perintah apt install nginx. Maka proses instalasi akan berjalan.
# apt install nginx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libgd3 libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-
mod-http-echo
libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-
subs-filter
libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-
mod-mail
libnginx-mod-stream libxpm4 libxslt1.1 nginx-common nginx-full
Suggested packages:
libgd-tools fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
libgd3 libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-
mod-http-echo
libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-
subs-filter
libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-
mod-mail
libnginx-mod-stream libxpm4 libxslt1.1 nginx nginx-common nginx-full
0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,179 kB of archives.
After this operation, 4,376 kB of additional disk space will be used.
Do you want to continue? [Y/n] [Tekan y untuk melanjutkan]
copy
4. Cek Service
Cek service nginx apakah sudah running atau belum menggunakan
perintah systemctl status nginx atau dengan perintah /etc/init.d/nginx status.
Jika ada keterangan yang menyatakan running apa service nginx sudah
berjalan dengan baik.
# systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor
preset: enabled)
Active: active (running) since Thu 2020-03-19 17:52:26 WIB; 1h 17min
ago
Docs: man:nginx(8)
Main PID: 911 (nginx)
Tasks: 3 (limit: 1149)
Memory: 10.3M
CGroup: /system.slice/nginx.service
copy
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}