25 lines
527 B
Nginx Configuration File
25 lines
527 B
Nginx Configuration File
|
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)$ {
|
||
|
root /usr/share/nginx/html;
|
||
|
expires 1y;
|
||
|
add_header Cache-Control "public, no-transform";
|
||
|
}
|
||
|
}
|