nginx 방향 에이전트 전단 프로젝트

1. https://www.cnblogs.com/a120608yby/p/10096948.html
vue 프로젝트 해결 nginx 방향 프 록 시 페이지 404 문제
2. https://www.jianshu.com/p/7d33d0330322
try_files $uri $uri/ @router; 이론 해석
3. https://www.jianshu.com/p/02ad1f919471

server {
listen       8091;    #          127.0.0.1:8090
server_name  localhost;  #            host

#charset koi8-r;
access_log  logs/k8s.log;

location / {
    root   D:/wqy/Project/quality/qualitydetect/web/dist;  #       
    try_files $uri $uri/ @router;
    index  index.html index.htm;
}

location @router {
    rewrite ^.*$ /index.html last;#       @router     vue    nginx     404
}

#     @router,                      ,           
#    rewrite index.html ,             
location /api {
    rewrite ^/api/(.*)$ /$1 break;
    proxy_pass   http://****:8880;  #****         
}

error_page   500 502 503 504  /50x.html;
location = /50x.html {
    root   html;
}

}

좋은 웹페이지 즐겨찾기