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