production 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. include /etc/nginx/conf.d/server_config;
  2. upstream web {
  3. server web:8000;
  4. }
  5. server {
  6. listen [::]:80;
  7. listen 80;
  8. server_name your-domain.com www.your-domain.com;
  9. location ~ /.well-known/acme-challenge {
  10. allow all;
  11. root /var/www/certbot;
  12. }
  13. # # redirect http to https
  14. # return 301 https://your-domain.com$request_uri;
  15. }
  16. # server {
  17. # access_log /var/log/nginx/access.log cache_log;
  18. #
  19. # listen [::]:443 ssl http2;
  20. # listen 443 ssl http2;
  21. #
  22. # server_name your-domain.com;
  23. #
  24. # client_max_body_size 3M;
  25. #
  26. # if ($host != "your-domain.com") {
  27. # return 301 $scheme://your-domain.com$request_uri;
  28. # }
  29. #
  30. # # SSL code
  31. # ssl_certificate /etc/nginx/ssl/live/your-domain.com/fullchain.pem;
  32. # ssl_certificate_key /etc/nginx/ssl/live/your-domain.com/privkey.pem;
  33. #
  34. # location ~ /.well-known/acme-challenge {
  35. # allow all;
  36. # root /var/www/certbot;
  37. # }
  38. #
  39. # sendfile on;
  40. # tcp_nopush on;
  41. # tcp_nodelay on;
  42. # keepalive_timeout 65;
  43. # types_hash_max_size 2048;
  44. # #include /etc/nginx/mime.types;
  45. # #default_type application/octet-stream;
  46. #
  47. # gzip on;
  48. # gzip_disable "msie6";
  49. #
  50. # proxy_read_timeout 1800s;
  51. # chunked_transfer_encoding on;
  52. #
  53. # # store responses to anonymous users for up to 1 minute
  54. # proxy_cache bookwyrm_cache;
  55. # proxy_cache_valid any 1m;
  56. # add_header X-Cache-Status $upstream_cache_status;
  57. #
  58. # # ignore the set cookie header when deciding to
  59. # # store a response in the cache
  60. # proxy_ignore_headers Cache-Control Set-Cookie Expires;
  61. #
  62. # # PUT requests always bypass the cache
  63. # # logged in sessions also do not populate the cache
  64. # # to avoid serving personal data to anonymous users
  65. # proxy_cache_methods GET HEAD;
  66. # proxy_no_cache $cookie_sessionid;
  67. # proxy_cache_bypass $cookie_sessionid;
  68. #
  69. # # tell the web container the address of the outside client
  70. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  71. # proxy_set_header Host $host;
  72. # proxy_redirect off;
  73. #
  74. # location ~ ^/(login[^-/]|password-reset|resend-link|2fa-check) {
  75. # limit_req zone=loginlimit;
  76. # proxy_pass http://web;
  77. # }
  78. #
  79. # # do not log periodic polling requests from logged in users
  80. # location /api/updates/ {
  81. # access_log off;
  82. # proxy_pass http://web;
  83. # }
  84. #
  85. # location / {
  86. # proxy_pass http://web;
  87. # }
  88. #
  89. # # directly serve images and static files from the
  90. # # bookwyrm filesystem using sendfile.
  91. # # make the logs quieter by not reporting these requests
  92. # location ~ ^/(images|static)/ {
  93. # root /app;
  94. # try_files $uri =404;
  95. # add_header X-Cache-Status STATIC;
  96. # access_log off;
  97. # }
  98. #
  99. # # monitor the celery queues with flower, no caching enabled
  100. # location /flower/ {
  101. # proxy_pass http://flower:8888;
  102. # proxy_cache_bypass 1;
  103. # }
  104. # }
  105. # Reverse-Proxy server
  106. # server {
  107. # listen [::]:8001;
  108. # listen 8001;
  109. # server_name your-domain.com www.your-domain.com;
  110. # location / {
  111. # proxy_pass http://web;
  112. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  113. # proxy_set_header Host $host;
  114. # proxy_redirect off;
  115. # }
  116. # location /images/ {
  117. # alias /app/images/;
  118. # }
  119. # location /static/ {
  120. # alias /app/static/;
  121. # }
  122. # }