Skip to content

Commit

Permalink
fix template to work for bibdata-staging config
Browse files Browse the repository at this point in the history
Co-authored-by: Christina Chortaria <christinach@users.noreply.github.com>
  • Loading branch information
2 people authored and sandbergja committed Nov 3, 2023
1 parent 627d198 commit 55d25b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions roles/nginxplus/templates/http/library.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ server {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_cache {{ item.short_name }}cache;
# handle errors using errors.conf
proxy_intercept_errors on;
# TODO don't do a health check if there's only one server
{% if item.health_check_URI is defined %}
Expand All @@ -73,6 +74,10 @@ server {
}
{% else %}
location {{ item.location }} {
{% if item.app_protect == "enabled" %}
app_protect_enable on;
app_protect_security_log_enable on;
{% endif %}
proxy_pass http://{{ item.short_name }};
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
19 changes: 10 additions & 9 deletions roles/nginxplus/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,16 @@ sites:
# visibility: private
# added_restrictions: htc_restrict.conf
# app_protect: disabled
# - name: bibdata-staging
# servers:
# # - bibdata-alma-staging1
# - bibdata-alma-staging2
# short_name: bibdata-staging
# location: "/"
# visibility: private
# added_restrictions: htc_restrict.conf
# app_protect: disabled
- name: bibdata-staging
servers:
# - bibdata-alma-staging1
- bibdata-alma-staging2
short_name: bibdata-staging
location: "/"
visibility: private
added_restrictions:
- "htc_restrict.conf"
app_protect: enabled
# - name: byzantine-tsp-prod
# servers:
# - byzantine-tsp-prod
Expand Down

0 comments on commit 55d25b1

Please sign in to comment.