teachcloud.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. server {
  2. listen 7400;
  3. access_log off;
  4. charset utf-8;
  5. client_max_body_size 512m;
  6. location ^~ / {
  7. root ../../teachcloud/web/print/;
  8. try_files $uri $uri/ /index.html;
  9. }
  10. location /static/ {
  11. alias ../../teachcloud/static/;
  12. add_header Access-Control-Allow-Origin *;
  13. }
  14. location /mark/ {
  15. alias ../../teachcloud/web/mark/;
  16. index index.html index.htm;
  17. try_files $uri $uri/ /mark/index.html;
  18. }
  19. location ^~ /api/ {
  20. proxy_pass http://127.0.0.1:7410;
  21. proxy_set_header Host $http_host;
  22. proxy_set_header X-Real-IP $remote_addr;
  23. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  24. }
  25. location ^~ /fss/ {
  26. proxy_pass http://127.0.0.1:7410;
  27. proxy_set_header Host $http_host;
  28. proxy_set_header X-Real-IP $remote_addr;
  29. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30. }
  31. }