-
Notifications
You must be signed in to change notification settings - Fork 1
/
nginx.conf
74 lines (66 loc) · 2.02 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
location ~* \.(js|jpg|jpeg|gif|png|webp|css|tgz|gz|rar|bz2|doc|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|woff|woff2|svg)$ {
etag off;
#if_modified_since exact
add_header Pragma "public";
add_header Cache-Control "max-age=31536000, public";
}
add_header Access-Control-Allow-Origin "facebook.com";
add_header Access-Control-Allow-Origin "idalibre.com";
add_header Access-Control-Allow-Origin "*.idalibre.com";
add_header Access-Control-Allow-Origin "idalibre.com:444";
add_header Access-Control-Allow-Origin "*.idalibre.com:444";
# location / {
# etag off;
# add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate";
# add_header Pragma "no-cache";
# }
# ::::::::::::::: HTACCESS converted :::::::::::::::::::
#NGINX configuration:
gzip on;
gzip_vary on;
gzip_types application/atom+xml \;
map $sent_http_content_type $expires {
default +1w;
text/css +1w;
application/json +2h;
application/xml +2h;
text/xml +2h;
image/x-icon +1M;
text/x-component +24h;
text/html +24h;
application/javascript +1w;
application/x-web-app-manifest+json +1w;
text/cache-manifest +1w;
audio/ogg +1w;
image/gif +1w;
image/jpeg +1w;
image/png +1w;
image/webp +1w;
video/mp4 +1w;
video/ogg +1w;
video/webm +1w;
application/atom+xml +900s;
application/rss+xml +900s;
application/font-woff +1w;
application/vnd.ms-fontobject +1w;
application/x-font-ttf +1w;
image/svg+xml +1w;
}
server {
server_name juan-palma.idalibre.com;
error_page 404 /404.html;
charset utf-8;
deny all;
expires $expires;
# !!! UNABLE TO REWRITE:
# RewriteCond %{HTTPS} !=on
# RewriteCond $host ^www\.(.+)$ [NC]
# RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
# !!! UNABLE TO REWRITE:
# RewriteCond %{SCRIPT_FILENAME} -d [OR]
# RewriteCond %{SCRIPT_FILENAME} -f
# RewriteRule "(^|/)\." - [F]
# !!! UNABLE TO REWRITE:
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://$host%{REQUEST_URI} [L,R=301]
}