File tree Expand file tree Collapse file tree 6 files changed +15
-15
lines changed Expand file tree Collapse file tree 6 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 88
99run :
1010 - file :
11- path : " /etc/nginx/conf.d/outlets/server/offline-page.conf"
11+ path : " /etc/nginx/conf.d/outlets/server/30- offline-page.conf"
1212 contents : |
1313 error_page 502 /error_page.html;
1414 location /error_page.html {
Original file line number Diff line number Diff line change @@ -113,14 +113,14 @@ hooks:
113113 ACCOUNT_EMAIL=$$ENV_LETSENCRYPT_ACCOUNT_EMAIL
114114
115115 - replace :
116- filename : " /etc/nginx/conf.d/outlets/server/https.conf"
116+ filename : " /etc/nginx/conf.d/outlets/server/20- https.conf"
117117 from : /ssl_certificate.+/
118118 to : |
119119 ssl_certificate /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.cer;
120120 ssl_certificate /shared/ssl/$$ENV_DISCOURSE_HOSTNAME_ecc.cer;
121121
122122 - replace :
123- filename : " /etc/nginx/conf.d/outlets/server/https.conf"
123+ filename : " /etc/nginx/conf.d/outlets/server/20- https.conf"
124124 from : /ssl_certificate_key.+/
125125 to : |
126126 ssl_certificate_key /shared/ssl/$$ENV_DISCOURSE_HOSTNAME.key;
Original file line number Diff line number Diff line change 77
88run :
99 - file :
10- path : " /etc/nginx/conf.d/outlets/before-server/ratelimited.conf"
10+ path : " /etc/nginx/conf.d/outlets/before-server/30- ratelimited.conf"
1111 contents : |
1212 limit_req_zone $binary_remote_addr zone=flood:10m rate=$reqs_per_secondr/s;
1313 limit_req_zone $binary_remote_addr zone=bot:10m rate=$reqs_per_minuter/m;
1616 limit_conn_status 429;
1717
1818 - file :
19- path : " /etc/nginx/conf.d/outlets/discourse/ratelimited.conf"
19+ path : " /etc/nginx/conf.d/outlets/discourse/30- ratelimited.conf"
2020 contents : |
2121 limit_conn connperip $conn_per_ip;
2222 limit_req zone=flood burst=$burst_per_second nodelay;
Original file line number Diff line number Diff line change 1212 #!/bin/bash
1313 rm -rf /shared/nginx.http*.sock
1414 - replace :
15- filename : " /etc/nginx/conf.d/outlets/server/http.conf"
15+ filename : " /etc/nginx/conf.d/outlets/server/10- http.conf"
1616 from : /listen 80;(\nlisten \[::\]:80;)?/
1717 to : |
1818 listen unix:/shared/nginx.http.sock;
1919 set_real_ip_from unix:;
2020 - replace :
21- filename : " /etc/nginx/conf.d/outlets/server/https.conf"
21+ filename : " /etc/nginx/conf.d/outlets/server/20- https.conf"
2222 from : /listen 443 ssl;(\nlisten \[::\]:443 ssl;)?/
2323 to : |
2424 listen unix:/shared/nginx.https.sock ssl;
Original file line number Diff line number Diff line change 33 cmd :
44 - " mkdir -p /shared/ssl/"
55 - file :
6- path : " /etc/nginx/conf.d/outlets/before-server/redirect-http-to-https.conf"
6+ path : " /etc/nginx/conf.d/outlets/before-server/10- redirect-http-to-https.conf"
77 contents : |
88 server {
99 listen 80;
1010 return 301 https://$$ENV_DISCOURSE_HOSTNAME$request_uri;
1111 }
12- - exec : rm /etc/nginx/conf.d/outlets/server/http.conf
12+ - exec : rm /etc/nginx/conf.d/outlets/server/10- http.conf
1313 - file :
1414 hook : ssl
15- path : " /etc/nginx/conf.d/outlets/server/https.conf"
15+ path : " /etc/nginx/conf.d/outlets/server/20- https.conf"
1616 contents : |
1717 listen 443 ssl;
1818 http2 on;
3434 rewrite (.*) https://$$ENV_DISCOURSE_HOSTNAME$1 permanent;
3535 }
3636 - file :
37- path : " /etc/nginx/conf.d/outlets/discourse/https.conf"
37+ path : " /etc/nginx/conf.d/outlets/discourse/20- https.conf"
3838 contents : |
3939 add_header Strict-Transport-Security 'max-age=31536000';
4040 - exec :
4141 cmd :
4242 - |-
4343 if [ -f "/proc/net/if_inet6" ] ; then
44- sed -i 's/listen 80;/listen 80;\nlisten [::]:80;/g' /etc/nginx/conf.d/outlets/before-server/redirect-http-to-https.conf
45- sed -i 's/listen 443 ssl;/listen 443 ssl;\nlisten [::]:443 ssl;/g' /etc/nginx/conf.d/outlets/server/https.conf
44+ sed -i 's/listen 80;/listen 80;\nlisten [::]:80;/g' /etc/nginx/conf.d/outlets/before-server/10- redirect-http-to-https.conf
45+ sed -i 's/listen 443 ssl;/listen 443 ssl;\nlisten [::]:443 ssl;/g' /etc/nginx/conf.d/outlets/server/20- https.conf
4646 fi
Original file line number Diff line number Diff line change 165165 - sed -i 's#listen 80;##g' /etc/nginx/conf.d/discourse.conf
166166 - |-
167167 if [ -f "/proc/net/if_inet6" ]; then
168- echo "listen 80;\nlisten [::]:80;" > /etc/nginx/conf.d/outlets/server/http.conf
168+ echo "listen 80;\nlisten [::]:80;" > /etc/nginx/conf.d/outlets/server/10- http.conf
169169 else
170- echo "listen 80;" > /etc/nginx/conf.d/outlets/server/http.conf
170+ echo "listen 80;" > /etc/nginx/conf.d/outlets/server/10- http.conf
171171 fi
172172
173173 - exec :
You can’t perform that action at this time.
0 commit comments