Nginx 同时支持 http 和 https

当然起项目的会后也分成俩

    "dev": "vue-cli-service serve --port=8080",
"dev:ssl": "vue-cli-service serve --port=8081 --https",
  server {
listen 8889 ssl;
server_name localhost;

ssl_certificate ../html/cert/server.crt;
ssl_certificate_key ../html/cert/server.key;

ssl_session_timeout 1m;
ssl_protocols SSLv2 SSLv3 TLSv1.2;
#ssl_ciphers HIGH:!aNULL:!MD5;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256:AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
ssl_prefer_server_ciphers on;

location /process_web_xxxx {
proxy_pass https://192.168.40.54:5002/process_web_xxxx/;
}

location /xxxx_web {
proxy_pass https://192.168.40.54:8081/xxxx_web/;
}
#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 html;
}
}

server {
listen 8888;
server_name localhost;

location /process_web_xxxx {
proxy_pass http://192.168.40.54:5001/process_web_xxxx/;
}

location /xxxx_web {
proxy_pass http://192.168.40.54:8080/xxxx_web/;
}
#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 html;
}
}

---------------------------------------------
生活的意义并不是与他人争高下,而在于享受努力实现目标的过程,结果是对自己行动的嘉奖。
↑面的话,越看越不痛快,应该这么说:

生活的意义就是你自己知道你要做什么,明确目标。没有目标,后面都是瞎扯!