website/nginx.conf

25 lines
536 B
Nginx Configuration File
Raw Normal View History

server {
listen 80;
server_name localhost;
gzip on;
gzip_types text/plain application/xml;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location ~*.(js|css|ico)$ {
root /usr/share/nginx/html;
expires 2d;
add_header Cache-Control "public, no-transform";
}
location ~*.(ttf|png|jpg|jpeg|gif|svg|webp)$ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public, no-transform";
}
}