Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3778602
D3367.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3367.diff
View Options
diff --git a/roles/webserver-core/nginx/config.sls b/roles/webserver-core/nginx/config.sls
--- a/roles/webserver-core/nginx/config.sls
+++ b/roles/webserver-core/nginx/config.sls
@@ -55,6 +55,7 @@
- file_mode: 644
- template: jinja
- context:
+ nginx_version: {{ salt["nginx.version"]() }}
nginx_dir: {{ dirs.etc }}/nginx
nginx_options: {{ options }}
certbot_dir: {{ certbot_dir }}
diff --git a/roles/webserver-core/nginx/files/includes/tls b/roles/webserver-core/nginx/files/includes/tls
--- a/roles/webserver-core/nginx/files/includes/tls
+++ b/roles/webserver-core/nginx/files/includes/tls
@@ -16,8 +16,14 @@
# and will be lost if the state is redeployed.
# </auto-generated>
+{% if salt["pkg.version_cmp"](nginx_version, "1.25.1") >= 0 -%}
+listen 443 ssl;
+listen [::]:443 ssl;
+http2 on;
+{%- else -%}
listen 443 ssl http2;
listen [::]:443 ssl http2;
+{%- endif %}
keepalive_timeout 70;
diff --git a/roles/webserver-core/nginx/files/includes/tls-modern-only b/roles/webserver-core/nginx/files/includes/tls-modern-only
--- a/roles/webserver-core/nginx/files/includes/tls-modern-only
+++ b/roles/webserver-core/nginx/files/includes/tls-modern-only
@@ -16,8 +16,14 @@
# and will be lost if the state is redeployed.
# </auto-generated>
+{% if salt["pkg.version_cmp"](nginx_version, "1.25.1") >= 0 -%}
+listen 443 ssl;
+listen [::]:443 ssl;
+http2 on;
+{%- else -%}
listen 443 ssl http2;
listen [::]:443 ssl http2;
+{%- endif %}
keepalive_timeout 70;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 05:43 (12 m, 9 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2264041
Default Alt Text
D3367.diff (1 KB)
Attached To
Mode
D3367: Switch to http2 directive for nginx 1.25.1+
Attached
Detach File
Event Timeline
Log In to Comment