File tree Expand file tree Collapse file tree 5 files changed +20
-16
lines changed Expand file tree Collapse file tree 5 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 60
60
# on_calendar: "Mon *-*-* 04:00:00"
61
61
ratelimitingcrawlers : true
62
62
is_default : true
63
+ is_behind_cloudfront : false # set to true to disable gzip.
63
64
basic_auth :
64
65
auth_enabled : false
65
66
auth_file : " " # optionally provide the path on the deploy server to a htpasswd file - WARNING - it must be valid and will not be checked!
Original file line number Diff line number Diff line change 52
52
force : true
53
53
with_items :
54
54
- _common
55
+ - _common_cloudfront
55
56
- custom
56
57
- docker_registry
57
58
- drupal_common
Original file line number Diff line number Diff line change
1
+ ### {{ ansible_managed }}
2
+
3
+ gzip off;
4
+ proxy_buffer_size 512k;
5
+ proxy_buffers 8 256k;
6
+ client_body_buffer_size 512k;
7
+ fastcgi_buffer_size 512k ;
8
+ fastcgi_buffers 8 256k ;
9
+ client_max_body_size {{ nginx.client_max_body_size }} ;
10
+ # Disable content sniffing, since it's an attack vector.
11
+ add_header X-Content-Type-Options nosniff;
Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ http {
23
23
24
24
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
25
25
'$status $body_bytes_sent "$http_referer" '
26
- '"$http_user_agent" $request_length $body_bytes_sent ';
26
+ '"$http_user_agent" $request_length';
27
27
28
28
log_format proxy '$http_x_forwarded_for - $remote_user [$time_local] "$request" '
29
29
'$status $body_bytes_sent "$http_referer" '
30
- '"$http_user_agent" $request_length $body_bytes_sent ';
30
+ '"$http_user_agent" $request_length';
31
31
32
32
server_names_hash_bucket_size {{ nginx.http.server_names_hash_bucket_size }};
33
33
# server_name_in_redirect off;
@@ -50,22 +50,9 @@ http {
50
50
error_log {{ nginx.http.error_log }};
51
51
52
52
##
53
- # Gzip Settings
53
+ # Additional Settings
54
54
##
55
55
56
- gzip on;
57
-
58
- # gzip_vary on;
59
- # gzip_proxied any;
60
- # gzip_comp_level 6;
61
- # gzip_buffers 16 8k;
62
- # gzip_http_version 1.1;
63
- # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
64
-
65
- ##
66
- # Additional Settings
67
- ##
68
-
69
56
{% if nginx .http .custom_directives is defined %}
70
57
{% for directive in nginx .http .custom_directives %}
71
58
{{ directive }}
Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ server {
28
28
access_log {{ domain.access_log }} {{ domain.access_log_format | default('main') }};
29
29
root "{{ domain.webroot }}";
30
30
include "/etc/nginx/conf.d/{{ domain.project_type }}";
31
+ {% if domain .is_behind_cloudfront is defined and domain .is_behind_cloudfront %}
32
+ include "/etc/nginx/conf.d/_common_cloudfront";
33
+ {% else %}
31
34
include "/etc/nginx/conf.d/_common";
35
+ {% endif %}
32
36
{% if domain .ssl is defined and domain .ssl .handling == 'letsencrypt' %}
33
37
{% if domain .ssl .web_server | default ('standalone' ) == 'standalone' %}
34
38
# Proxy for certbot (LetsEncrypt)
You can’t perform that action at this time.
0 commit comments