First, upload a file package
The compressed package dist.zip --- uploaded to the system such as linux / home / server / dist
Extracting archive
cd /home/server/dist
##解压
unzip dist.zip
Second, the configuration nginx configuration file
--------- determine suffix as host and contract staff
cd /xxx/nginx/conf
Edit nginx.conf vi nginx.conf
niginx configuration increases
location /host{
alias /home/server/vue/dist/;
index index.html;
try_files $uri $uri/ /index.html last;
}
location /(后缀名){
alias 压缩包解压路径;
index index.html;
try_files $uri $uri/ /index.html last;
}
- Sbin directory to the next restart nginx nginx
./nginx –s reload
Third, access the web site