feat: generate a default vhost for smart proxy instances
This commit is contained in:
parent
861f5fb553
commit
1797c4a826
1 changed files with 12 additions and 0 deletions
|
@ -120,6 +120,17 @@ class ProxyAutomation(TerraformAutomation):
|
|||
self.tmpl_write(
|
||||
f"smart_proxy.{group.id}.conf",
|
||||
"""
|
||||
server {
|
||||
listen 443 ssl default_server;
|
||||
server_name www.{{ group.group_name | lower }}.smart.{{ smart_zone[:-1] }};
|
||||
location / {
|
||||
add_header Content-Type text/html;
|
||||
return 200 "<html></html>";
|
||||
}
|
||||
ssl_certificate /etc/ssl/smart_proxy.crt;
|
||||
ssl_certificate_key /etc/ssl/private/smart_proxy.key;
|
||||
}
|
||||
|
||||
{% for origin in origins %}
|
||||
server {
|
||||
listen 443 ssl;
|
||||
|
@ -180,6 +191,7 @@ class ProxyAutomation(TerraformAutomation):
|
|||
{% endfor %}
|
||||
""",
|
||||
provider=self.provider,
|
||||
group=group,
|
||||
origins=group_origins,
|
||||
smart_zone=app.config["SMART_ZONE"],
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue