Matrix Docker Ansible eploy
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

72 строки
1.9 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. # (mounting `/dev/null` over `/etc/nginx/conf.d/default.conf` works well)
  7. #
  8. # The following changes have been done compared to a default nginx configuration file:
  9. # - default server port is changed (80 -> 8080), so that a non-root user can bind it
  10. # - various temp paths are changed to `/tmp`, so that a non-root user can write to them
  11. # - the `user` directive was removed, as we don't want nginx to switch users
  12. worker_processes 1;
  13. error_log /var/log/nginx/error.log warn;
  14. pid /tmp/nginx.pid;
  15. events {
  16. worker_connections 1024;
  17. }
  18. http {
  19. proxy_temp_path /tmp/proxy_temp;
  20. client_body_temp_path /tmp/client_temp;
  21. fastcgi_temp_path /tmp/fastcgi_temp;
  22. uwsgi_temp_path /tmp/uwsgi_temp;
  23. scgi_temp_path /tmp/scgi_temp;
  24. include /etc/nginx/mime.types;
  25. default_type application/octet-stream;
  26. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  27. '$status $body_bytes_sent "$http_referer" '
  28. '"$http_user_agent" "$http_x_forwarded_for"';
  29. access_log /var/log/nginx/access.log main;
  30. sendfile on;
  31. #tcp_nopush on;
  32. keepalive_timeout 65;
  33. #gzip on;
  34. server {
  35. listen 8080;
  36. server_name localhost;
  37. root /usr/share/nginx/html;
  38. location / {
  39. # Inspired by: https://raw.githubusercontent.com/cinnyapp/cinny/dev/docker-nginx.conf
  40. root /usr/share/nginx/html;
  41. rewrite ^/config.json$ /config.json break;
  42. rewrite ^/manifest.json$ /manifest.json break;
  43. rewrite ^.*/olm.wasm$ /olm.wasm break;
  44. rewrite ^/sw.js$ /sw.js break;
  45. rewrite ^/pdf.worker.min.js$ /pdf.worker.min.js break;
  46. rewrite ^/public/(.*)$ /public/$1 break;
  47. rewrite ^/assets/(.*)$ /assets/$1 break;
  48. rewrite ^(.+)$ /index.html break;
  49. }
  50. }
  51. }