teachcloud.conf 848 B

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