bytesailingMobile2.conf 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #
  2. # server {
  3. # listen 80;
  4. # server_name wmswx.adprintingplus.com;
  5. # rewrite ^(.*) https://$server_name$1 permanent;
  6. # }
  7. server {
  8. listen 10008;
  9. # listen 443 ssl;
  10. # server_name wmswx.adprintingplus.com;
  11. # 启用支持websocket连接
  12. # proxy_set_header Upgrade $http_upgrade;
  13. # proxy_set_header Connection "upgrade";
  14. # proxy_http_version 1.1;
  15. gzip on;
  16. gzip_min_length 1k;
  17. gzip_comp_level 9;
  18. gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
  19. gzip_vary on;
  20. gzip_disable "MSIE [1-6]\.";
  21. # 配置访问域名,域名可以有多个,用空格隔开
  22. # ssl_certificate /etc/nginx/conf.d/ssl/storageWeb-java/7692306_wmswx.adprintingplus.com.pem; #需要将cert-file-name.pem替换成已上传的证书文件的名称。
  23. # ssl_certificate_key /etc/nginx/conf.d/ssl/storageWeb-java/7692306_wmswx.adprintingplus.com.key; #需要将cert-file-name.key替换成已上传的证书私钥文件的名称。
  24. # ssl_session_timeout 5m;
  25. # ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  26. # ssl_prefer_server_ciphers on;
  27. location / {
  28. # 编译后的文件启动配置
  29. root /mnt/vue/bytesailingMobile2/dist;
  30. client_max_body_size 1000m;
  31. index index.html index.htm;
  32. try_files $uri $uri/ /index.html;
  33. }
  34. location /test-api {
  35. rewrite ^/api/(.*)$ /$1 break;
  36. proxy_pass http://127.0.0.1:9898;
  37. client_max_body_size 1000m;
  38. }
  39. # location /file {
  40. # root /mnt/;
  41. # }
  42. error_page 405 =200 $uri;
  43. error_page 404 /404.html;
  44. error_page 500 502 503 504 /50x.html;
  45. location = /50x.html {
  46. root html;
  47. }
  48. }