upstream info_admin { server 139.9.138.217:30101; } upstream big_screen { server 139.9.138.217:30301; } #server { # listen 80; # listen [::]:80; # server_name mz.tshe.cn; #用户服务器的域名 # rewrite ^(.*) https://$server_name$1 permanent; #} server { listen 80; listen [::]:80; location / { proxy_set_header Host $http_host; proxy_pass http://172.17.0.1:20000; } } server { # https配置 listen 443 ssl; server_name mz.tshe.cn; #用户服务器的域名 ssl_certificate cert/7949414_mz.tshe.cn.pem; ssl_certificate_key cert/7949414_mz.tshe.cn.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; # https配置 #access_log /var/log/nginx/host.access.log main; rewrite ^/collection/public/uploads/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/uploads/$1 permanent; rewrite ^/collection/public/file/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/file/sit/$1 permanent; rewrite ^/collection/public/file/(.*) https://strong-info.oss-cn-beijing.aliyuncs.com/public/file/sit/$1 permanent; location /infoAdmin/ { proxy_pass http://139.9.138.217:60001/; } location /infoVue/ { proxy_pass http://139.9.138.217:60002/; } location /vueScreen/ { proxy_pass http://139.9.138.217:60003/; } location /collection/ { proxy_pass http://info_admin/; } location /bigScreen/ { proxy_pass http://big_screen/; } location /onlineExamSys/ { proxy_pass http://139.9.138.217:60077/; } location /prod-api/ { proxy_pass http://139.9.138.217:800/prod-api/; } location / { root /usr/share/nginx/html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }