


02T_VPC_PUB_NGINX_SUB_02A
10.250.1.0/24
02T_VPC_PUB_NGINX_SUB_02B
10.250.11.0/24
02T_VPC_PUB_BESTION_SUB_02B
10.250.13.0/24
02T_VPC_PRI_PYTHON_SUB_02A
10.250.2.0/24
02T_VPC_PRI_PYTHON_SUB_02B
10.250.12.0/24
02T_VPC_PRI_DB_SUB_02A
10.250.3.0/24







0.0.0.0/0 nat-046953550cfcc4117

02T_VPC_PRI_PYTHON_SUB_02A
10.250.2.0/24
02T_VPC_PRI_PYTHON_SUB_02B
10.250.12.0/24
02T_VPC_PRI_DB_SUB_02A
10.250.3.0/24

0.0.0.0/0 igw-0b61c40ecfebaca7b

02T_VPC_PUB_NGINX_SUB_02A
10.250.1.0/24
02T_VPC_PUB_NGINX_SUB_02B
10.250.11.0/24
02T_VPC_PUB_BESTION_SUB_02B
10.250.13.0/24



bestion 서버 생성




nginx 2a 인스턴스 생성
--->
--->이거 그대로 입력
ubuntu@ip-10-250-11-240:~$ sudo apt update
sudo apt install nginx
ubuntu@ip-10-250-11-240:~$ nginx -v
nginx version: nginx/1.28.1
ubuntu@ip-10-250-11-240:~$ sudo systemctl start nginx
ubuntu@ip-10-250-11-240:~$ sudo systemctl status nginx
nginx.service - nginx - high performance web server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2025-12-29 01:37:05 UTC; 6s ago
Docs: https://nginx.org/en/docs/
Process: 1935 ExecStart=/usr/sbin/nginx -c ${CONFFILE} (code=exited, status=0/SUCCESS)
Main PID: 1936 (nginx)
Tasks: 2 (limit: 1125)
Memory: 2.5M
CPU: 9ms
CGroup: /system.slice/nginx.service
├─1936 "nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf"
└─1937 "nginx: worker process" "" "" "" "" "" "" "" "" "" "" "" "" "" "" ""


, www 사용

생성확인




엔드포인트 생성확인


2a 2b 둘다 접속가능



npm install
1-2. 빌드
bash
코드 복사
npm run build
결과
scp -i ~/Downloads/KSB06-powermvp.pem -r dist ubuntu@3.19.143.145:/home/ubuntu/

dist/
├─ index.html
└─ assets/
2. 빌드 파일을 서버로 전송 (scp)
맥(로컬)에서 실행
scp -i ~/Downloads/KSB06-powermvp.pem -r dist ubuntu@3.19.143.145:/home/ubuntu/
결과:
/home/ubuntu/dist
nginx 정적 경로로 이동
cd /usr/share/nginx/html
결과:
index.html
assets/
50x.html
4️⃣ nginx 설정 (React SPA + 도메인)
sudo nano /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name ksbmaster.store www.ksbmaster.store;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;