teachcloud.conf 822 B

123456789101112131415161718192021222324252627282930
  1. server {
  2. listen 7400;
  3. charset utf-8;
  4. # 知学知考
  5. location ^~ / {
  6. root ../../teachcloud/web/print/;
  7. index index.html index.htm;
  8. try_files $uri $uri/ /index.html;
  9. }
  10. # 阅卷端
  11. location /mark/ {
  12. alias ../../teachcloud/web/mark/;
  13. index index.html index.htm;
  14. try_files $uri $uri/ index.html;
  15. }
  16. location /static/ {
  17. alias ../../teachcloud/static/;
  18. add_header Access-Control-Allow-Origin *;
  19. }
  20. location ^~ /api/ {
  21. proxy_pass http://127.0.0.1:7410;
  22. proxy_set_header Host $http_host;
  23. proxy_set_header X-Real-IP $remote_addr;
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. }
  26. }