自建服务器

2021-01-01

编译后文件位于public目录

上传


  1. 上传public目录

    可使用 ftp,git,svn,scp 等

  2. 配置 web 服务器

    可使用 nginx,apache,iis,candy 等

配置


  1. nginx

     1server{
     2    listen 80;
     3    server_name {your-domain-name};
     4    charset utf-8,gb2312;
     5    access_log /var/log/nginx/{your-domain-name}_access.log  main;
     6    error_log /var/log/nginx/{your-domain-name}_error.log warn;
     7    location = / {
     8        root /{your-file-path}/public;
     9        expires 30d;
    10        access_log off;
    11        default_type text/html;
    12    }
    13    location / {
    14        root  /{your-file-path}/public;
    15        index index.html;
    16    }
    17    location /assets {
    18        root  /{your-file-path}/public;
    19        index index.html;
    20    }
    21    location /media {
    22        root  /{your-file-path}/public;
    23        index index.html;
    24    }
    25}
    
  2. apache

    comming soon

  3. iis

    comming soon

  4. candy

    comming soon