Enable HTTPS sites only when cert exists
This commit is contained in:
parent
1ed05c94f1
commit
c5dac00a36
2 changed files with 4 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
</ifmodule>
|
||||
</VirtualHost>
|
||||
|
||||
<IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}>
|
||||
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:80>
|
||||
ServerAdmin {{ server_admin }}
|
||||
ServerName {{ site_name }}
|
||||
|
@ -36,3 +37,4 @@
|
|||
RewriteRule (.*) {{forward_to}} [R=301,L]
|
||||
</ifmodule>
|
||||
</VirtualHost>
|
||||
</IfFile>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
</ifmodule>
|
||||
</VirtualHost>
|
||||
|
||||
<IfFile /usr/local/etc/dehydrated/certs/{{ site_name }}>
|
||||
<VirtualHost {{ ansible_default_ipv4.address }}:443 [{{ ansible_default_ipv6.address }}]:443>
|
||||
ServerAdmin {{ server_admin }}
|
||||
ServerName {{ site_name }}
|
||||
|
@ -30,3 +31,4 @@
|
|||
|
||||
ProxyPass / http://localhost:{{proxy_port}}/
|
||||
</VirtualHost>
|
||||
</IfFile>
|
||||
|
|
Loading…
Reference in a new issue