# # !!! This file is managed by Ansible !!! # upstream oeffisearch { least_conn; server 127.0.0.1:8081; server 127.0.0.1:8082; server 127.0.0.1:8083; server 127.0.0.1:8084; } {% if services.oeffisearch.nginx.sslOnly is not defined or services.oeffisearch.nginx.sslOnly is false %} server { listen 80 ; listen [::]:80; server_name {{ services.oeffisearch.nginx.domain }}; location / { try_files $uri $uri/ @api; root /usr/share/oeffisearch; } location @api { proxy_pass http://oeffisearch; } } {% endif %} {% if services.oeffisearch.nginx.ssl.enable is true %} server { listen 443 ssl; listen [::]:443 ssl; ssl_certificate "{{ services.oeffisearch.nginx.ssl.cert }}"; ssl_certificate_key "{{ services.oeffisearch.nginx.ssl.privkey }}"; include /etc/nginx/ssl.conf; server_name {{ services.oeffisearch.nginx.domain }}; location / { try_files $uri $uri/ @api; root /usr/share/oeffisearch; } location @api { proxy_pass http://oeffisearch; } } {% endif %}