server {
#监听端口
listen 443;
server_name 域名;
# SSL BEGIN
ssl on;
ssl_certificate /绝对路径/SSL证书.crt;
ssl_certificate_key /绝对路径/SSL密钥.key;
# SSL END
location / {
# 反向代理
proxy_pass http://localhost:7001;
}
location /console {
alias/root documentRoot;
index index.html;
}
}
alias适用于SPA应用编译出来,publicPath非根目录的应用