Vue 项目中的nginx配置 发表于 2018-06-10 | 分类于 前端杂谈 history模式下 配置rewrite规则123location / { try_files $uri $uri/ /index.html;} 配置接口的反向代理12345678910111213141516server { listen 80; server_name a.com; root /wwwroot/test; autoindex off; index index.html index.htm index.php; # 将a.com/api的所有请求反向代理到b.com location /open/api { proxy_pass http://b.com; } location ~ /\.ht { deny all; }} 前端手艺工坊