← back to Japan Enrich

deploy/japan-china.designerwallcoverings.com.nginx

17 lines

# japan. + china.designerwallcoverings.com → the staging viewer (pm2 japan-viewer :9931).
# One node process serves both; the app differentiates by Host header (hostScope) and
# enforces Basic Auth when REQUIRE_AUTH=1. Place in /etc/nginx/sites-available/, symlink
# into sites-enabled/, `nginx -t`, reload, then certbot --nginx for SSL.
server {
  server_name japan.designerwallcoverings.com china.designerwallcoverings.com;
  client_max_body_size 12m;              # matches the import-queue body cap
  location / {
    proxy_pass http://127.0.0.1:9934;   # japan-viewer listens on 9934 (9931 on this box is a DIFFERENT app)
    proxy_set_header Host $host;          # REQUIRED — hostScope reads Host to pick japan vs china
    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;
  }
  listen 80;
}