scp dist.zip user@host:/xx/xx/xx
server {
listen 80;
server_name www.xxx.com;
location / {
index /data/dist/index.html;
}
}
nginx -t
nginx -s reload
以上是最直接的一种部署方式。更高级的部署方式,如自动化、镜像、容器和流水线部署,本质上是将此逻辑抽象和程序化,本文不展开讨论。
scp dist.zip user@host:/xx/xx/xx
server {
listen 80;
server_name www.xxx.com;
location / {
index /data/dist/index.html;
}
}
nginx -t
nginx -s reload