Matrix Docker Ansible eploy
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

61 satır
1.6 KiB

  1. # This is a custom nginx configuration file that we use in the container (instead of the default one),
  2. # because it allows us to run nginx with a non-root user.
  3. #
  4. # For this to work, the default vhost file (`/etc/nginx/conf.d/default.conf`) also needs to be removed.
  5. # (mounting `/dev/null` over `/etc/nginx/conf.d/default.conf` works well)
  6. #
  7. # The following changes have been done compared to a default nginx configuration file:
  8. # - default server port is changed (80 -> 8080), so that a non-root user can bind it
  9. # - various temp paths are changed to `/tmp`, so that a non-root user can write to them
  10. # - the `user` directive was removed, as we don't want nginx to switch users
  11. worker_processes 1;
  12. error_log /var/log/nginx/error.log warn;
  13. pid /tmp/nginx.pid;
  14. events {
  15. worker_connections 1024;
  16. }
  17. http {
  18. proxy_temp_path /tmp/proxy_temp;
  19. client_body_temp_path /tmp/client_temp;
  20. fastcgi_temp_path /tmp/fastcgi_temp;
  21. uwsgi_temp_path /tmp/uwsgi_temp;
  22. scgi_temp_path /tmp/scgi_temp;
  23. include /etc/nginx/mime.types;
  24. default_type application/octet-stream;
  25. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  26. '$status $body_bytes_sent "$http_referer" '
  27. '"$http_user_agent" "$http_x_forwarded_for"';
  28. access_log /var/log/nginx/access.log main;
  29. sendfile on;
  30. #tcp_nopush on;
  31. keepalive_timeout 65;
  32. #gzip on;
  33. server {
  34. listen 8080;
  35. server_name localhost;
  36. location / {
  37. root /usr/share/nginx/html;
  38. index index.html index.htm;
  39. }
  40. error_page 500 502 503 504 /50x.html;
  41. location = /50x.html {
  42. root /usr/share/nginx/html;
  43. }
  44. }
  45. }