windows环境
1.如何发布打包后文件夹
将打包生成好的文件复制到服务器上的发布路径上,则:发布完成,如下图:
如果是父工程发布,需要将dist文件夹下文件全部复制过来,子工程则是一个文件夹(例eventName)
2.Nginx启动
以武汉开发环境为例(nginx安装路径为:D:\soft\nginx-New),如下图:
3.Nginx下配置
http {#开启静态资源压缩gzip on;gzip_min_length 1k;gzip_buffers 4 16k;gzip_comp_level 2;gzip_types text/plain application/json application/javascript application/css text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;gzip_vary off;gzip_disable "MSIE [1-6]\.";server {#端口listen 18000;location / {root D:/webMicro;try_files $uri /index.html;index index.html index.htm;}#禁止缓存HTML文件location ~ .*\.(html)$ {root D:/webMicro;add_header Cache-Control no-store;}}}
nginx.txt(附件后缀应为.conf,但是无法上传)
