AWS

AWS : WEB ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ

NENGIN 2024. 7. 8. 10:07

1. ์ธ์Šคํ„ด์Šค ์ƒ์„ฑ

NGINX Web Server ์ธ์Šคํ„ด์Šค ์ƒ์„ฑํ•˜๊ธฐ

 

 

 

2. mobaxterm ์ ‘์†

์ƒ์„ฑํ•œ ์ธ์Šคํ„ดํŠธ์˜ ip์ฃผ์†Œ๋กœ ์ ‘๊ทผ

1) instance ip ์ฃผ์†Œ ์ž…๋ ฅ

2) Specify username ์ฒดํฌ ํ›„ ec2-user์ž…๋ ฅ

3) User private key ์ฒดํฌ ํ›„ key pair์˜ pem ํŒŒ์ผ ๊ฒฝ๋กœ ์ง€์ •

์ ‘์† ์„ฑ๊ณต

 

 

 

3. httpd ์„ค์น˜

[ec2-user@ip-10-200-1-184 ~]$ sudo yum -y install httpd

[ec2-user@ip-10-200-1-184 ~]$ sudo systemctl start httpd

[ec2-user@ip-10-200-1-184 ~]$ sudo systemctl status httpd
โ— httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2024-07-07 11:28:31 UTC; 5s ago
     Docs: man:httpd.service(8)
 Main PID: 9192 (httpd)
   Status: "Processing requests..."
   CGroup: /system.slice/httpd.service
           โ”œโ”€9192 /usr/sbin/httpd -DFOREGROUND
           โ”œโ”€9193 /usr/sbin/httpd -DFOREGROUND
           โ”œโ”€9194 /usr/sbin/httpd -DFOREGROUND
           โ”œโ”€9195 /usr/sbin/httpd -DFOREGROUND
           โ”œโ”€9196 /usr/sbin/httpd -DFOREGROUND
           โ””โ”€9197 /usr/sbin/httpd -DFOREGROUND

Jul 07 11:28:31 ip-10-200-1-184.ap-northeast-2.compute.internal systemd[1]: Starting T...
Jul 07 11:28:31 ip-10-200-1-184.ap-northeast-2.compute.internal systemd[1]: Started Th...
Hint: Some lines were ellipsized, use -l to show in full.

[ec2-user@ip-10-200-1-184 ~]$ sudo systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

 

 

 

4. root ์ ‘๊ทผ

[ec2-user@ip-10-200-1-184 ~]$ sudo passwd root
Changing password for user root.
New password:
BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.

[ec2-user@ip-10-200-1-184 ~]$ su -
Password:

[root@ip-10-200-1-184 ~]#

 

 

 

5. index.html ์ƒ์„ฑ

[root@ip-10-200-1-184 ~]# echo 'AWS HTTP test' > /var/www/html/index.html

[root@ip-10-200-1-184 ~]# curl http://54.180.131.165
AWS HTTP test

 

 

 


 

 

 

 

์ฐธ์กฐ ๋ธ”๋กœ๊ทธ : https://jindevelopetravel0919.tistory.com/189

 

 

1. FQDN ์ ‘์†์„ ์œ„ํ•ด ๊ฐ€๋น„์•„ ๋„๋ฉ”์ธ ๊ตฌ์ž…

๋„๋ฉ”์ธ 500์› ๊ตฌ๋งค

 

 

2. Route 53 ํ˜ธ์ŠคํŒ… ์˜์—ญ ์ƒ์„ฑ

ํ˜ธ์ŠคํŒ… ์˜์—ญ ์ƒ์„ฑ ์„ ํƒ

 

 

 

3. ๋ ˆ์ฝ”๋“œ ์ƒ์„ฑ

์ธ์Šคํ„ด์Šค ip๋ฅผ ๊ฐ€์ง„ ๋ ˆ์ฝ”๋“œ๊ฐ€ ์ƒ์„ฑ๋จ

 

 

 

4. ๊ฐ€๋น„์•„ ๋„๋ฉ”์ธ NS ํŽธ์ง‘

๊ธฐ๋ณธ ํ˜ธ์ŠคํŠธ๋ช…์„ ์ง€์šด ํ›„ ํŠธ๋ž˜ํ”ฝ ๋ผ์šฐํŒ… ๋Œ€์ƒ ์ฃผ์†Œ๋กœ ๋ณ€๊ฒฝ

 

 

 

5. ์ผ์ •์‹œ๊ฐ„ ๋Œ€๊ธฐ ํ›„ http://minjin.shop์œผ๋กœ ์ ‘์†