nginx.conf.j2 851 B

123456789101112131415161718192021222324252627
  1. # This file contains the base config for the reverse proxy, as part of ../Dockerfile-workers.
  2. # configure_workers_and_start.py uses and amends to this file depending on the workers
  3. # that have been selected.
  4. {{ upstream_directives }}
  5. server {
  6. # Listen on an unoccupied port number
  7. listen 8008;
  8. listen [::]:8008;
  9. server_name localhost;
  10. # Nginx by default only allows file uploads up to 1M in size
  11. # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
  12. client_max_body_size 100M;
  13. {{ worker_locations }}
  14. # Send all other traffic to the main process
  15. location ~* ^(\\/_matrix|\\/_synapse) {
  16. proxy_pass http://localhost:8080;
  17. proxy_set_header X-Forwarded-For $remote_addr;
  18. proxy_set_header X-Forwarded-Proto $scheme;
  19. proxy_set_header Host $host;
  20. }
  21. }