Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
Allow to optionally configure additional Nginx server directives
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashuste committed Aug 26, 2020
1 parent 057282d commit 531d886
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,29 @@ zammad_ssl_key:
```
Content of SSL/TLS private key (**required**).
```yaml
zammad_nginx_additional_server_configs:
- |
server {
listen 80;
server_name zammad.example.com zammad-old.example.com;
return 301 https://zammad.example.com$request_uri;
}
- |
server {
listen 443 ssl;
# ... SSL configuration
server_name zammad-old.example.com;
return 301 https://zammad.example.com$request_uri;
}
```
Configure additional server directives in the Nginx configuration.
This allows to implement more use case specific adjustments, e.g.
configuring multiple domains or the redirection of outdated domains to the
most recent one.
```yaml
elasticsearch_url: "http://localhost:9200"
```
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ zammad_ssl_key_path: "/etc/ssl/private/zammad_key.pem"
zammad_ssl_key:
zammad_ssl_cert:

zammad_nginx_additional_server_configs: []

elasticsearch_url: "http://localhost:9200"
...
4 changes: 4 additions & 0 deletions templates/nginx-zammad.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,7 @@ server {
gzip_proxied any;
}
}

{% for server_config in zammad_nginx_additional_server_configs %}
{{ server_config }}
{% endfor %}

0 comments on commit 531d886

Please sign in to comment.