markingcloud.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. server {
  2. listen 8000;
  3. location /favicon.ico {
  4. root ../../markingcloud/web/;
  5. try_files $uri /;
  6. expires 10d;
  7. }
  8. location = /web/mark {
  9. rewrite /web/mark /web/mark/ last;
  10. }
  11. location ^~ /web/mark/ {
  12. alias ../../markingcloud/web/;
  13. try_files $uri $uri/ /web/mark/index.html;
  14. }
  15. location ^~ /web/admin/ {
  16. alias ../../markingcloud/web/;
  17. try_files $uri $uri/ /web/mark/index.html;
  18. }
  19. location ^~ /assets/ {
  20. alias ../../markingcloud/web/assets/;
  21. try_files $uri $uri/ =404;
  22. }
  23. location ^~ / {
  24. proxy_pass http://127.0.0.1:8080;
  25. proxy_set_header Host $http_host;
  26. proxy_set_header X-Real-IP $remote_addr;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. }
  29. }
  30. server {
  31. listen 9000;
  32. location / {
  33. root ../../markingcloud/static/;
  34. add_header Access-Control-Allow-Origin *;
  35. }
  36. }