You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
903 B

  1. server {
  2. listen 80;
  3. charset utf-8;
  4. add_header X-Frame-Options DENY;
  5. add_header X-Content-Type-Options nosniff;
  6. add_header X-XSS-Protection "1; mode=block";
  7. location / {
  8. root /var/www/html;
  9. try_files $uri /index.html;
  10. }
  11. location /v1/ {
  12. proxy_pass http://backend:8000/v1/;
  13. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  14. proxy_set_header Host $host;
  15. proxy_redirect off;
  16. proxy_read_timeout 300;
  17. }
  18. location /admin/ {
  19. proxy_pass http://backend:8000/admin/;
  20. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  21. proxy_set_header Host $host;
  22. proxy_redirect off;
  23. }
  24. location = /admin {
  25. absolute_redirect off;
  26. return 301 /admin/;
  27. }
  28. location /static/ {
  29. autoindex on;
  30. alias /static/;
  31. }
  32. }
  33. server_tokens off;