Skip to content

Commit bc5ba4f

Browse files
committed
feat(nginx): renumber template includes and glob env overlays
Shift core-works-redirects to 30- and hastac-redirects to 40- so the include order in the hcommons server block reads top-to-bottom: buddypress (20), env overlay (25*), core-works (30), redirects (40). Update nginx.conf and the hcommons/hastac-org templates to match. The hcommons template now globs 25*.conf so env-specific overlays slot in by filename without further edits; the dev overlay renames to 25-buddypress-redirects.conf.template to reflect its actual role.
1 parent d891950 commit bc5ba4f

6 files changed

Lines changed: 7 additions & 5 deletions

File tree

config/all/nginx/nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ http {
2626
# This is kind of ridiculous, but we have some very long-running scripts.
2727
fastcgi_read_timeout 180s;
2828

29-
include /etc/nginx/conf.d/hcommons.conf;
30-
include /etc/nginx/conf.d/hastac-org.conf;
29+
include /etc/nginx/conf.d/00-hcommons.conf;
30+
include /etc/nginx/conf.d/10-hastac-org.conf;
3131
}

config/all/nginx/templates/00-hcommons.conf.template

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ server {
8585
}
8686
rewrite ^/app/uploads/sites/[0-9]+/bp-attachments/([0-9]+)/(.*) https://$http_host/?p=$1&bp-attachment=$2;
8787

88-
include /etc/nginx/conf.d/redirects.conf;
89-
include /etc/nginx/conf.d/core-works-redirects.conf;
88+
include /etc/nginx/conf.d/20-buddypress.conf;
89+
include /etc/nginx/conf.d/25*.conf;
90+
include /etc/nginx/conf.d/30-core-works-redirects.conf;
91+
include /etc/nginx/conf.d/40-redirects.conf;
9092

9193
location /core/ {
9294
return 301 https://works.hcommons.org;

config/all/nginx/templates/10-hastac-org.conf.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ server {
88
return 301 https://hastac.${DOMAIN_NAME};
99
}
1010

11-
include /etc/nginx/conf.d/hastac-redirects.conf;
11+
include /etc/nginx/conf.d/40-hastac-redirects.conf;
1212
}

config/all/nginx/templates/20-core-works-redirects.conf.template renamed to config/all/nginx/templates/30-core-works-redirects.conf.template

File renamed without changes.

config/all/nginx/templates/30-hastac-redirects.conf.template renamed to config/all/nginx/templates/40-hastac-redirects.conf.template

File renamed without changes.

config/dev/nginx/templates/25-dev-redirects.conf.template renamed to config/dev/nginx/templates/25-buddypress-redirects.conf.template

File renamed without changes.

0 commit comments

Comments
 (0)