Skip to content

Commit 89cb553

Browse files
committed
fix nginx redirects section
1 parent a754d54 commit 89cb553

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

server/conf/nginx_vhost.conf.master

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,19 @@ location ~ /\.well-known/acme-challenge/ {
310310

311311
<tmpl_loop name="redirects">
312312
server {
313-
listen <tmpl_var name='ip_address'>:80;
313+
listen <tmpl_var name='ip_address'>:<tmpl_var name='http_port'>;
314314
<tmpl_if name='ipv6_enabled'>
315-
listen [<tmpl_var name='ipv6_address'>]:80;
315+
listen [<tmpl_var name='ipv6_address'>]:<tmpl_var name='http_port'>;
316316
</tmpl_if>
317-
317+
318318
<tmpl_if name='ssl_enabled'>
319-
listen <tmpl_var name='ip_address'>:443 ssl;
319+
listen <tmpl_var name='ip_address'>:<tmpl_var name='https_port'> ssl{tmpl_if name='enable_http2' op='==' value='y'} http2{/tmpl_if}{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if};
320+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
320321
<tmpl_if name='ipv6_enabled'>
321-
listen [<tmpl_var name='ipv6_address'>]:443 ssl;
322+
listen [<tmpl_var name='ipv6_address'>]:<tmpl_var name='https_port'> ssl{tmpl_if name='enable_http2' op='==' value='y'} http2{/tmpl_if}{tmpl_if name='enable_spdy' op='==' value='y'} spdy{/tmpl_if};
322323
</tmpl_if>
323-
ssl_certificate <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt;
324-
ssl_certificate_key <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key;
324+
ssl_certificate <tmpl_var name='ssl_crt_file'>;
325+
ssl_certificate_key <tmpl_var name='ssl_key_file'>;
325326
</tmpl_if>
326327

327328
server_name <tmpl_var name='rewrite_domain'>;

0 commit comments

Comments
 (0)