default.conf 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. upstream info_admin {
  2. server 139.9.138.217:30101;
  3. }
  4. upstream big_screen {
  5. server 139.9.138.217:30301;
  6. }
  7. #server {
  8. # listen 80;
  9. # listen [::]:80;
  10. # server_name mz.tshe.cn; #用户服务器的域名
  11. # rewrite ^(.*) https://$server_name$1 permanent;
  12. #}
  13. server {
  14. listen 80;
  15. listen [::]:80;
  16. location / {
  17. proxy_set_header Host $http_host;
  18. proxy_pass http://172.17.0.1:20000;
  19. }
  20. }
  21. server {
  22. # https配置
  23. listen 443 ssl;
  24. server_name mz.tshe.cn; #用户服务器的域名
  25. ssl_certificate cert/7949414_mz.tshe.cn.pem;
  26. ssl_certificate_key cert/7949414_mz.tshe.cn.key;
  27. ssl_session_timeout 5m;
  28. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  29. ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
  30. ssl_prefer_server_ciphers on;
  31. # https配置
  32. #access_log /var/log/nginx/host.access.log main;
  33. rewrite ^/collection/public/uploads/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/uploads/$1 permanent;
  34. rewrite ^/collection/public/file/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/file/sit/$1 permanent;
  35. rewrite ^/collection/public/file/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/file/sit/$1 permanent;
  36. location /infoAdmin/ {
  37. proxy_pass http://139.9.138.217:60001/;
  38. }
  39. location /infoVue/ {
  40. proxy_pass http://139.9.138.217:60002/;
  41. }
  42. location /vueScreen/ {
  43. proxy_pass http://139.9.138.217:60003/;
  44. }
  45. location /collection/ {
  46. proxy_pass http://info_admin/;
  47. }
  48. location /bigScreen/ {
  49. proxy_pass http://big_screen/;
  50. }
  51. location /onlineExamSys/ {
  52. proxy_pass http://139.9.138.217:60077/;
  53. }
  54. location /prod-api/ {
  55. proxy_pass http://139.9.138.217:800/prod-api/;
  56. }
  57. location / {
  58. root /usr/share/nginx/html;
  59. index index.html index.htm;
  60. }
  61. #error_page 404 /404.html;
  62. # redirect server error pages to the static page /50x.html
  63. #
  64. error_page 500 502 503 504 /50x.html;
  65. location = /50x.html {
  66. root /usr/share/nginx/html;
  67. }
  68. }