You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The HTTP redirect URL map (`interledger-org-http-redirect`) handles all HTTP traffic:
40
+
- All HTTP requests receive a 301 permanent redirect to HTTPS
41
+
- Preserves the original hostname and path
42
+
- Configuration stored in `ci/deploy/http-redirect-urlmap.yaml`
43
+
44
+
**Key Point**: We maintain TWO separate URL maps - one for HTTPS routing (the main `urlmap.yaml`) and one for HTTP→HTTPS redirect (`http-redirect-urlmap.yaml`). When adding new domains, update BOTH files.
45
+
35
46
### Database Credentials
36
47
37
48
**Never hardcode database credentials in settings.php!**
1.**HTTP and HTTPS for New Domains**: When adding a new domain, configure BOTH protocols:
230
+
-**HTTPS**: Create certificate, certificate map entry, and add to `ci/deploy/urlmap.yaml`
231
+
-**HTTP**: Add domain to `ci/deploy/http-redirect-urlmap.yaml` and import the updated config
232
+
- Forgetting HTTP redirect means `http://` requests will fail instead of redirecting to `https://`
233
+
- Both URL maps share the same IP address (34.111.215.251) but use different forwarding rules and target proxies
234
+
- Certificate map entries take 5-10 minutes to become ACTIVE
205
235
206
236
2.**Database Name in SQL Dumps**: Cloud SQL exports include the source database name. The backupmanager automatically replaces this during restore, but if you manually restore, you must replace all occurrences of the source database name with the target database name.
**Configuration File**: `ci/deploy/http-redirect-urlmap.yaml` defines the redirect behavior:
130
+
- All HTTP requests receive a 301 permanent redirect to HTTPS
131
+
- Host rules ensure redirects work for all domains (production, staging, www)
132
+
- Preserves the original path and query parameters
133
+
105
134
**Key architectural decisions:**
106
135
107
136
-**Single Backend for Both Environments**: Both production and staging use `drupal-sites-backend` because a VM instance can only belong to one load-balanced instance group
@@ -198,9 +227,17 @@ gcloud compute operations list \
198
227
199
228
### Update URL Map
200
229
201
-
The URL Map defines all routing rules. The current configuration is stored in `ci/deploy/urlmap.yaml`.
230
+
The URL Map defines all routing rules. We maintain two URL maps:
231
+
232
+
1.**HTTPS URL Map** (`interledger-org`): Routes HTTPS traffic to backends
233
+
- Configuration: `ci/deploy/urlmap.yaml`
234
+
- Handles path-based routing to different backends
202
235
203
-
#### Make Changes to URL Map
236
+
2.**HTTP Redirect URL Map** (`interledger-org-http-redirect`): Redirects HTTP to HTTPS
0 commit comments