mirror of
https://github.com/StepanovPlaton/AboutMe.git
synced 2026-04-03 12:20:48 +04:00
25 lines
601 B
Nginx Configuration File
25 lines
601 B
Nginx Configuration File
server {
|
|
listen 8091;
|
|
server_name _;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
|
|
|
# Cache static assets
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Main location
|
|
location / {
|
|
try_files $uri $uri/ $uri.html /index.html;
|
|
}
|
|
|
|
# Error pages
|
|
error_page 404 /404.html;
|
|
}
|