---
# System prepended metadata

title: NGINX

---

# NGINX

##### Config untuk angular
Lokasi config: `/etc/nginx/sites-available/default`
```jsonld=
server {
  listen 0.0.0.0:80;
  gzip on;
  gzip_types text/plain application/xml;
  gzip_proxied no-cache no-store private expired auth;
  gzip_min_length 1000;
  
  location / {
    root /var/www/html;
    try_files $uri $uri/ /index.html;
  }
}
```

##### Tambah web server
```shell=
mkdir /var/www/html_baru
vim /var/www/html_baru/index.html
vim /etc/nginx/sites-available/html_baru.conf
cp /etc/nginx/sites-available/html_baru.conf /etc/nginx/sites-enabled
nginx -t
systemctl restart nginx
```