teachcloud.conf 796 B

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