Skip to content
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
8 changes: 4 additions & 4 deletions roles/debian/nginx/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
state: directory
mode: "0755"

- name: Set nginx location behavior, fallback to default if no custom behavior is provided
set_fact:
nginx_location_behavior: "{{ nginx.custom_nginx_location_behavior | default(['try_files @rewrite /index.php?$query_string;']) }}"

- name: Copy project type-specific configuration in place.
ansible.builtin.template:
src: "{{ item }}.j2"
Expand Down Expand Up @@ -150,10 +154,6 @@
- nginx.overrides is defined
- nginx.overrides | length > 0

- name: Set nginx location behavior, fallback to default if no custom behavior is provided
set_fact:
nginx_location_behavior: "{{ nginx.custom_nginx_location_behavior | default(['try_files @rewrite /index.php?$query_string;']) }}"

- name: Test NGINX configuration.
ansible.builtin.command: nginx -t
register: _nginx_test_result
Expand Down
2 changes: 1 addition & 1 deletion roles/debian/nginx/templates/drupal_common.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ location / {
# @todo
# limit_req zone=bots burst=5 nodelay;
{% endif %}
{{ nginx.nginx_location_behavior | join("\n ") }}
{{ nginx_location_behavior | join("\n ") }}
}

############ Blacklist block.
Expand Down
Loading