default.conf 981 B

12345678910111213141516171819202122232425262728293031323334
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4. server_name kyl-sanatorium-admin.mdxq.net;
  5. client_max_body_size 60m; #上传文件大小限制
  6. client_body_buffer_size 512k;
  7. client_header_buffer_size 2k;
  8. #charset koi8-r;
  9. #access_log /var/log/nginx/host.access.log main;
  10. location / {
  11. root /usr/share/nginx/html;
  12. index index.html index.htm;
  13. proxy_set_header Upgrade $http_upgrade;
  14. proxy_set_header Connection upgrade;
  15. }
  16. location /api/ {
  17. rewrite ^/api(.*)$ $1 break;
  18. proxy_pass https://kyl-sanatorium-admin.mdxq.net ;
  19. proxy_set_header Upgrade $http_upgrade;
  20. proxy_set_header Connection upgrade;
  21. }
  22. #error_page 404 /404.html;
  23. # redirect server error pages to the static page /50x.html
  24. #
  25. error_page 500 502 503 504 /50x.html;
  26. location = /50x.html {
  27. root /usr/share/nginx/html;
  28. }
  29. }