728x90
๋ฐ˜์‘ํ˜•

 

spring boot ํ”„๋กœ์ ํŠธ๋ฅผ aws Elastic ์œผ๋กœ ๋ฐฐํฌ ํ•˜๋ ค ์‹œ๋„ ํ•˜์˜€์œผ๋‚˜ ์œ„์™€ ๊ฐ™์€ 502 ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. 

 

 

aws Elastic Beanstalk ์€ ๊ธฐ๋ณธํฌํŠธ๋กœ 5000์„ ์‚ฌ์šฉํ•œ๋‹ค๊ณ  ํ•จ. ๊ทธ๋ ‡๊ธฐ์— ํฌํŠธ๋ฅผ ์ง€์ •ํ•ด์ค€๋‹ค. 

 

 

[๊ตฌ์„ฑ] ๋ฉ”๋‰ด๋กœ ๋“ค์–ด๊ฐ€ [์—…๋ฐ์ดํŠธ, ๋ชจ๋‹ˆํ„ฐ๋ง ๋ฐ ๋กœ๊น…] ์˜ ํŽธ์ง‘ ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ ์ด๋™ํ•œ๋‹ค. 

 

ํ™˜๊ฒฝ์†์„ฑ ๋ถ€๋ถ„์— ์•„๋ž˜์™€ ๊ฐ™์ด ํฌํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด ํ•ด์ฃผ๋„๋ก ํ•œ๋‹ค. 

 

 

 

ํ•ด๊ฒฐ์™„๋ฃŒ!

 

 

SERVER_PORT๋Š” ์™œ 5000์ผ๊นŒ์š”?
Elastic Beanstalk๋Š” nginx๋ฅผ ์—ญ๋ฐฉํ–ฅ ํ”„๋ก์‹œ๋กœ ์‚ฌ์šฉํ•˜์—ฌ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ํฌํŠธ 80์˜ Elastic Load Balancing ๋กœ๋“œ ๋ฐธ๋Ÿฐ์„œ์— ๋งคํ•‘ํ•ฉ๋‹ˆ๋‹ค. Elastic Beanstalk๋Š” ํ™•์žฅํ•˜๊ฑฐ๋‚˜ ์ž์ฒด ๊ตฌ์„ฑ์œผ๋กœ ์™„์ „ํžˆ ์žฌ์ •์˜ํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋ณธ nginx ๊ตฌ์„ฑ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ๋ณธ์ ์œผ๋กœ Elastic Beanstalk๋Š” ์š”์ฒญ์„ ํฌํŠธ 5000์˜ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์— ์ „๋‹ฌํ•˜๋„๋ก nginx ํ”„๋ก์‹œ๋ฅผ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค. PORT ํ™˜๊ฒฝ ์†์„ฑ์„ ๊ธฐ๋ณธ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์ด ์ˆ˜์‹  ๋Œ€๊ธฐํ•˜๋Š” ํฌํŠธ๋กœ ์„ค์ •ํ•˜์—ฌ ๊ธฐ๋ณธ ํฌํŠธ๋ฅผ ์žฌ์ •์˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ฐธ๊ณ  : https://docs.aws.amazon.com/ko_kr/elasticbeanstalk/latest/dg/java-se-nginx.html

 

 

 

https://velog.io/@bbamjoong/AWS-Java-SpringBoot-Elastic-BeanStalk-๋ฐฐํฌ-ํ”„๋กœ์ ํŠธ-3์ผ๊ฐ„์˜-์‚ฝ์งˆ

 

 

๋ฐ˜์‘ํ˜•
๋ž˜๋‹ˆ