๋ฐ์ํ
80 ํฌํธ(Nginx)๋ก ์์ฒญ์ด ์์๋ 8080 ํฌํธ(tomcat) ์ผ๋ก ์ฐ๊ฒฐ์ํค๋ ์ค์
$ sudo vi /etc/nginx/sites-enabled/default
//location ์ ์ค์ ์ถ๊ฐ์์ฑ
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
#try_files $uri $uri/ =404;
proxy_pass http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}
//i ๋๋ฌ์ ์์ฑํ :wq ์ ์ฅํ ์ข
๋ฃ
$ sudo service nginx restart
๊ทธํ์ https:// ๋๋ฉ์ธ ์ผ๋ก ์ ์ํ๋ฉด ํฐ์บฃํ๋ฉด์ด ๋์ค๋๊ฒ์ ํ์ธํ ์์๋ค! :)
300x250
'์๋ฒ > AWS' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[AWS] EC2 persistent instance retirement scheduled ํด๊ฒฐ (0) | 2022.04.21 |
---|---|
[error] EC2 ์๋ฒ ์ฌ๋ถํ ํ ๋ฐ์ดํฐ ์ฐ๋์๋ฌ ํด๊ฒฐํ๊ธฐ (0) | 2022.03.31 |
[AWS] ๋ณต๊ตฌํ ์์๋ ์ฅ์ - Amazon EC2 Instance Retirement (0) | 2022.03.30 |
AWS EC2 root ๋ณผ๋ฅจ์ฉ๋ ๋๋ฆฌ๊ธฐ (2) | 2022.03.22 |
EC2 nginx ์ค์น ๋ฐ ํฐ์บฃ์ฐ๋ (0) | 2022.01.26 |