typo fix, cdn default off, cdn gzip
parent
8a79d5d61b
commit
a19f92d0df
|
@ -13,7 +13,7 @@
|
||||||
https: false,
|
https: false,
|
||||||
http2: true,
|
http2: true,
|
||||||
email: 'hello@example.com',
|
email: 'hello@example.com',
|
||||||
cdn: true,
|
cdn: false,
|
||||||
non_www: true,
|
non_www: true,
|
||||||
php: '7.2',
|
php: '7.2',
|
||||||
index_html: false,
|
index_html: false,
|
||||||
|
@ -50,6 +50,8 @@
|
||||||
docs: 'pdf|docx?|xlsx?|pptx?'
|
docs: 'pdf|docx?|xlsx?|pptx?'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.gzipTypes = 'text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////
|
/////////////////////
|
||||||
|
|
|
@ -41,4 +41,4 @@ gzip on;
|
||||||
gzip_vary on;
|
gzip_vary on;
|
||||||
gzip_proxied any;
|
gzip_proxied any;
|
||||||
gzip_comp_level 6;
|
gzip_comp_level 6;
|
||||||
gzip_types text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml;</span>
|
gzip_types {{ gzipTypes }};</span>
|
|
@ -40,7 +40,14 @@ server {
|
||||||
|
|
||||||
ssl_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{ data.domain }}/privkey.pem;
|
ssl_certificate_key /etc/letsencrypt/live/{{ data.domain }}/privkey.pem;
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;
|
ssl_trusted_certificate /etc/letsencrypt/live/{{ data.domain }}/fullchain.pem;<span ng-if="data.gzip">
|
||||||
|
|
||||||
|
# gzip
|
||||||
|
gzip on;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_types {{ gzipTypes }};</span>
|
||||||
|
|
||||||
include _ssl.conf;
|
include _ssl.conf;
|
||||||
|
|
||||||
|
@ -51,7 +58,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
deny all
|
deny all;
|
||||||
}
|
}
|
||||||
}</span>
|
}</span>
|
||||||
|
|
||||||
|
@ -109,7 +116,14 @@ server {
|
||||||
server_name cdn.{{ data.domain }};
|
server_name cdn.{{ data.domain }};
|
||||||
root /var/www/{{ data.domain }}{{ data.document_root }};<span ng-if="data.access_log !== ''">
|
root /var/www/{{ data.domain }}{{ data.document_root }};<span ng-if="data.access_log !== ''">
|
||||||
|
|
||||||
access_log off;</span>
|
access_log off;</span><span ng-if="data.gzip">
|
||||||
|
|
||||||
|
# gzip
|
||||||
|
gzip on;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_proxied any;
|
||||||
|
gzip_comp_level 6;
|
||||||
|
gzip_types {{ gzipTypes }};</span>
|
||||||
|
|
||||||
location ~* \.(?:{{ extensions.assets }}|{{ extensions.fonts }}|{{ extensions.svg }}|{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }}|{{ extensions.docs }})$ {
|
location ~* \.(?:{{ extensions.assets }}|{{ extensions.fonts }}|{{ extensions.svg }}|{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }}|{{ extensions.docs }})$ {
|
||||||
add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
|
@ -118,7 +132,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
deny all
|
deny all;
|
||||||
}
|
}
|
||||||
}</span>
|
}</span>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue