diff --git a/nginx/templates/nginx-virthost.j2 b/nginx/templates/nginx-virthost.j2
index 0de8dfc..ece32e8 100644
--- a/nginx/templates/nginx-virthost.j2
+++ b/nginx/templates/nginx-virthost.j2
@@ -72,8 +72,6 @@ server {
     client_body_timeout {{ nginx_client_body_timeout }};
     {% endif %}
 
-    server_tokens {{ item.server_tokens | default('off') }};
-
     {% if nginx_cors_enabled %}
     {% if nginx_cors_global %}
     include /etc/nginx/snippets/nginx-cors.conf;
@@ -211,10 +209,10 @@ server {
     client_body_timeout {{ nginx_client_body_timeout }};
     {% endif %}
 
-    server_tokens {{ item.server_tokens | default('off') }};
-
     include /etc/nginx/snippets/nginx-server-ssl.conf;
 
+    server_tokens {{ item.server_tokens | default('off') }};
+
     {% if nginx_cors_enabled %}
     {% if nginx_cors_global %}
     include /etc/nginx/snippets/nginx-cors.conf;