teachcloud.conf 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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 /fss/ {
  15. alias ../../teachcloud/static/;
  16. add_header Access-Control-Allow-Origin *;
  17. }
  18. location /mark/ {
  19. alias ../../teachcloud/web/mark/;
  20. index index.html index.htm;
  21. try_files $uri $uri/ /mark/index.html;
  22. }
  23. location ~ ^/(api|fss)/ {
  24. proxy_pass http://127.0.0.1:7410;
  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. }