typo fix, cdn default off, cdn gzip
parent
8a79d5d61b
commit
a19f92d0df
|
@ -13,7 +13,7 @@
|
|||
https: false,
|
||||
http2: true,
|
||||
email: 'hello@example.com',
|
||||
cdn: true,
|
||||
cdn: false,
|
||||
non_www: true,
|
||||
php: '7.2',
|
||||
index_html: false,
|
||||
|
@ -50,6 +50,8 @@
|
|||
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_proxied any;
|
||||
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_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;
|
||||
|
||||
|
@ -51,7 +58,7 @@ server {
|
|||
}
|
||||
|
||||
location / {
|
||||
deny all
|
||||
deny all;
|
||||
}
|
||||
}</span>
|
||||
|
||||
|
@ -109,7 +116,14 @@ server {
|
|||
server_name cdn.{{ data.domain }};
|
||||
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 }})$ {
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
|
@ -118,7 +132,7 @@ server {
|
|||
}
|
||||
|
||||
location / {
|
||||
deny all
|
||||
deny all;
|
||||
}
|
||||
}</span>
|
||||
|
||||
|
|
Loading…
Reference in New Issue