본문 바로가기

Vue.js

뷰js 배포

https://dev-r.tistory.com/6

라이트셰일에 

https://daily-life-of-bsh.tistory.com/223

 

환경설정 셋팅

cd /etc/nginx/sites-available 

sudo vim default

server{
  /*수정*/
  listen 9090 default_serer;
  /*수정*/
  listen [::]:9090 default_serer;
  /*수정*/
  root /var/www/html/static;     // build하면 생기는 폴더들을 /var/www/html하위에 static이라는 폴더이름으로 놓았다. 그걸 바라보도록

   /*추가*/
  location /api {   //서버로 가는 api 이름들은 전부 이렇게 설계해놓았었다. 그래서 서버 주소로 보냄
      proxy_pass http:/51.19.15.219:8080/api;
  }
  /*추가*/
  location /ws/ {   //웹소켓을 위한 프록시를 설정
        proxy_pass http://localhost:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
}

 

#GIT PULL 받음

#build로 생긴 static 파일들을 nginx가 바라보는 폴더로 복사해주기

  sudo cp -r helpworx/src/main/resources/static /var/www/html/

 

 

#nginx 재시작

  sudo service nginx restart

'Vue.js' 카테고리의 다른 글

Stroybook-vue 기본 생성법  (0) 2021.06.21
vue.js 입문자가 실무에서 주의해야할 5가지 특징  (0) 2021.05.09
라우팅 기본  (0) 2021.04.25
Created / Mount  (0) 2021.04.06
VS Code html 자동 태그 안됨 개선  (0) 2021.04.03