HTTP error! status: 502

atom·2023년 10월 22일
0

502 ERROR
The request could not be satisfied.

CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

오리진 url 의 80 포트로 접속이 가능해야 하는데 3000 번 포트로 서버를 수정해놔서 문제가 생겼다.

app.listen(3000, () => {
console.log("start server: localhost:3000");
});

아래와 같이 포트를 바꾸고 서버 재시작 후 성공

app.listen(80, () => {
console.log("start server: localhost:80");
});

주의할 점은 80포트는 루트권한으로 실행을 해야 한다.

sudo pm2 start index.js

0개의 댓글

Powered by GraphCDN, the GraphQL CDN