33 lines
919 B
Nginx Configuration File
33 lines
919 B
Nginx Configuration File
# Expires map
|
|
|
|
map $sent_http_content_type $expires {
|
|
default off;
|
|
text/html 7d;
|
|
text/css max;
|
|
application/javascript max;
|
|
~image/ max;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _ default_server;
|
|
root /usr/share/nginx/html;
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
#Compression
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
gzip_vary on;
|
|
gzip_comp_level 6;
|
|
gzip_buffers 16 8k;
|
|
gzip_http_version 1.1;
|
|
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/jpeg image/png image/svg+xml image/x-icon;
|
|
|
|
#Payload size
|
|
client_max_body_size 10m;
|
|
|
|
#Caching (save html page for 7 days, rest as long as possible)
|
|
expires $expires;
|
|
}
|