28 lines
796 B
Nginx Configuration File
28 lines
796 B
Nginx Configuration File
worker_processes 1;
|
|
error_log /dev/stderr warn;
|
|
pid /tmp/nginx.pid;
|
|
events { worker_connections 1024; }
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
access_log /dev/stdout;
|
|
sendfile on;
|
|
gzip on;
|
|
gzip_types text/plain text/css application/javascript application/json application/xml image/svg+xml;
|
|
gzip_min_length 1024;
|
|
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
error_page 404 /404.html;
|
|
add_header X-Content-Type-Options nosniff always;
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
|
location ~* \.(css|js|svg|png|jpg|ico|woff2?)$ {
|
|
expires 7d;
|
|
add_header Cache-Control "public";
|
|
}
|
|
location / {
|
|
try_files $uri $uri/ $uri/index.html =404;
|
|
}
|
|
}
|
|
}
|