nginx部署前端项目笔记

记录nginx部署前端项目所需配置

前端router history模式

server {
 listen 443; # 监听本机所有ip上的 443 端口
 server_name aax.xxx.com; # 域名地址
 root /xxx/xxx/xxx;
 # 新建日志文件
 access_log /xxx/xxx/xxx/xxx/xxx/access.log main; 
 
 location / {
 index index.html index.htm;
 try_files $uri $uri/ /index.html;
 }
 error_page 500 502 503 504 /502.html;
 location = /50x.html {
 root html;
 }
 }
作者:YuJoycy原文地址:https://segmentfault.com/a/1190000043577527

%s 个评论

要回复文章请先登录注册