38 lines
690 B
Nginx Configuration File
38 lines
690 B
Nginx Configuration File
server {
|
|
listen 8080;
|
|
listen [::]:8080;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
charset utf-8;
|
|
server_tokens off;
|
|
gzip on;
|
|
gzip_comp_level 6;
|
|
gzip_min_length 1024;
|
|
gzip_vary on;
|
|
gzip_types
|
|
text/plain
|
|
text/css
|
|
application/javascript
|
|
application/json
|
|
application/xml
|
|
image/svg+xml;
|
|
|
|
location = /healthz {
|
|
access_log off;
|
|
default_type text/plain;
|
|
return 200 "ok\n";
|
|
}
|
|
|
|
location ~* \.(?:css|js|svg|png|jpg|jpeg|webp|woff2)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public, max-age=604800, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri/ $uri/index.html =404;
|
|
}
|
|
}
|