teachcloud.conf 577 B

123456789101112131415161718192021
  1. server {
  2. listen 7400;
  3. charset utf-8;
  4. location ^~ / {
  5. root ../../teachcloud/web;
  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 ^~ /api/ {
  13. proxy_pass http://127.0.0.1:7410;
  14. proxy_set_header Host $http_host;
  15. proxy_set_header X-Real-IP $remote_addr;
  16. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  17. }
  18. }