nginx 설치

nginx.conf 파일 수정

server { listen 81; server_name localhost;

   location / { 
       proxy_pass <http://127.0.0.1:3000/>;  //서버url
   }
}
  1. aws ec2 인스턴스 생성
  2. 인바운드 규칙 설정(http 80, tcp 3000, ssh 22)
  3. sudo apt-get update (apt or yum)
  4. sudo apt-get install git npm nodejs nginx
  5. git clone https://github.com/osamhack2021/WEB_APP_IOT_ModuChangGo_Chang-keeper.git
  6. npm start 로 서버가동 후 publicIP:3000 테스트
  1. cd /etc/nginx
  2. sudo service nginx start
  3. publicIP, publicIP:80 테스트
  4. sudo vi /etc/nginx/nginx.conf 로 conf 파일 열기