Matrix Docker Ansible eploy
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 

56 рядки
1.5 KiB

  1. #jinja2: lstrip_blocks: "True"
  2. # This is a custom nginx configuration file that we use in the container (instead of the default one),
  3. # because it allows us to run nginx with a non-root user.
  4. #
  5. # For this to work, the default vhost file (`/etc/nginx/conf.d/default.conf`) also needs to be removed.
  6. #
  7. # The following changes have been done compared to a default nginx configuration file:
  8. # - various temp paths are changed to `/tmp`, so that a non-root user can write to them
  9. # - the `user` directive was removed, as we don't want nginx to switch users
  10. worker_processes 1;
  11. error_log /var/log/nginx/error.log warn;
  12. pid /tmp/nginx.pid;
  13. events {
  14. worker_connections 1024;
  15. }
  16. http {
  17. proxy_temp_path /tmp/proxy_temp;
  18. client_body_temp_path /tmp/client_temp;
  19. fastcgi_temp_path /tmp/fastcgi_temp;
  20. uwsgi_temp_path /tmp/uwsgi_temp;
  21. scgi_temp_path /tmp/scgi_temp;
  22. include /etc/nginx/mime.types;
  23. default_type application/octet-stream;
  24. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  25. '$status $body_bytes_sent "$http_referer" '
  26. '"$http_user_agent" "$http_x_forwarded_for"';
  27. {% if matrix_nginx_proxy_access_log_enabled %}
  28. access_log /var/log/nginx/access.log main;
  29. {% else %}
  30. access_log off;
  31. {% endif %}
  32. sendfile on;
  33. #tcp_nopush on;
  34. keepalive_timeout 65;
  35. #gzip on;
  36. {# Map directive needed for proxied WebSocket upgrades #}
  37. map $http_upgrade $connection_upgrade {
  38. default upgrade;
  39. '' close;
  40. }
  41. include /etc/nginx/conf.d/*.conf;
  42. }