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

Allow to optionally configure additional Nginx server directives #7

Merged
merged 1 commit into from
Aug 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}