default.conf 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. upstream info_admin {
  2. server 39.105.97.139:30101;
  3. }
  4. upstream big_screen {
  5. server 39.105.97.139:30301;
  6. }
  7. server {
  8. listen 80;
  9. listen [::]:80;
  10. server_name info.windd.cn; #用户服务器的域名
  11. rewrite ^(.*) https://$server_name$1 permanent;
  12. }
  13. server {
  14. # https配置
  15. listen 443 ssl;
  16. server_name info.windd.cn; #用户服务器的域名
  17. ssl_certificate cert/7949175_info.windd.cn.pem;
  18. ssl_certificate_key cert/7949175_info.windd.cn.key;
  19. ssl_session_timeout 5m;
  20. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  21. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  22. ssl_prefer_server_ciphers on;
  23. # https配置
  24. #access_log /var/log/nginx/host.access.log main;
  25. rewrite ^/collection/public/uploads/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/uploads/$1 permanent;
  26. rewrite ^/collection/public/file/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/file/prod/$1 permanent;
  27. # location /collection/public/uploads/ {
  28. # #alias /strong/images/info_admin/;
  29. # #autoindex on;
  30. # proxy_pass https://strong-info.oss-cn-beijing.aliyuncs.com/public/uploads/;
  31. # }
  32. #
  33. # location /collection/public/file/ {
  34. # #alias /strong/images/info_admin/;
  35. # #autoindex on;
  36. # proxy_pass https://strong-info.oss-cn-beijing.aliyuncs.com/public/file/prod/;
  37. # }
  38. location /infoAdmin/ {
  39. proxy_pass http://39.105.97.139:60001/;
  40. }
  41. location /infoVue/ {
  42. proxy_pass http://39.105.97.139:60002/;
  43. }
  44. location /vueScreen/ {
  45. proxy_pass http://39.105.97.139:60003/;
  46. }
  47. location /vueSelfFilling/ {
  48. proxy_pass http://39.105.97.139:60004/;
  49. }
  50. location /collection/ {
  51. proxy_pass http://info_admin/;
  52. }
  53. location /bigScreen/ {
  54. proxy_pass http://big_screen/;
  55. }
  56. location / {
  57. root /usr/share/nginx/html;
  58. index index.html index.htm;
  59. }
  60. # Web服务API 代理
  61. location /_AMapService/ {
  62. set $args "$args&jscode=41a050423ed7d7fb733a8af969515ab4";
  63. proxy_pass https://restapi.amap.com/;
  64. }
  65. #error_page 404 /404.html;
  66. # redirect server error pages to the static page /50x.html
  67. #
  68. error_page 500 502 503 504 /50x.html;
  69. location = /50x.html {
  70. root /usr/share/nginx/html;
  71. }
  72. }