July 3rd - Update landing page
This commit is contained in:
+17
-3
@@ -260,11 +260,19 @@ server {
|
||||
location / { proxy_pass http://127.0.0.1:8001; ... }
|
||||
}
|
||||
|
||||
# 2. APEX redirect — jqc.app has no registered tenant
|
||||
# 2. APEX — jqc.app serves the public marketing/landing page
|
||||
# (was a 301 redirect to lts.jqc.app; now proxied to the app, which the
|
||||
# tenant middleware serves the landing page for — see app/routes/landing.py)
|
||||
server {
|
||||
listen 80;
|
||||
server_name jqc.app;
|
||||
return 301 http://lts.jqc.app$request_uri;
|
||||
server_name jqc.app www.jqc.app;
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header Host $host; # resolver reads this
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
}
|
||||
|
||||
# 3. WILDCARD — all tenant subdomains
|
||||
@@ -275,6 +283,12 @@ server {
|
||||
}
|
||||
```
|
||||
|
||||
The apex block must pass `Host` through unchanged: the app's tenant middleware
|
||||
compares `request.host` to `TENANT_BASE_DOMAIN` (and its `www.` variant) and
|
||||
serves the landing page (`landing.index`) for `/`, bouncing any other apex path
|
||||
back to `/`. `/signup`, `/welcome`, and `/static/` are tenant-exempt and served
|
||||
directly. Tenant subdomains and `admin.jqc.app` are unaffected.
|
||||
|
||||
If `admin.jqc.app` is in the same block as `*.jqc.app`, Nginx routes it to port 8000 (main app), which returns "Workspace not found" because `admin.jqc.app` is not a registered tenant domain.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user