codestates / codestates/YUMMY-SEOUL

[Error handle log] EC2 PORT ERROR

Open
#31 0 comments 0 reactions 0 assignees View on GitHub
Server
Dominant language
TypeScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

***Error handling log

***발생한 오류
배포 중 EC2 에서 서버를 열때 port 80 으로 하니 Permission denied error 가 발생했다.

***해결방법
먼저 sudo npm start 를 통해 실행해봤지만 node 와 npm 버전이 달랐다.
(ex node -v => 16.13.0 , sudo node -v => 8.1.0)

sudo npm install -g n
sudo n 16.13.0

명령어를 통해 버전을 맞추고 sudo npm start 를 했지만 여전히 해결되지 않았다 .

두번째로 , 8080포트를 열고 이를 80 포트로 Redirection 하였다.
( sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 )
이후에 접속을 했더니 정상 작동 하였다.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.