Skip to content

Commit 0303856

Browse files
committed
fix: index 페이지 포워딩 문제
1 parent 3918798 commit 0303856

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

nginx.conf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
server {
2-
listen 443 ssl;
3-
server_name cs25.co.kr www.cs25.co.kr;
2+
listen 443 ssl;
3+
server_name cs25.co.kr www.cs25.co.kr;
44

5-
ssl_certificate /etc/letsencrypt/live/cs25.co.kr/fullchain.pem;
6-
ssl_certificate_key /etc/letsencrypt/live/cs25.co.kr/privkey.pem;
5+
ssl_certificate /etc/letsencrypt/live/cs25.co.kr/fullchain.pem;
6+
ssl_certificate_key /etc/letsencrypt/live/cs25.co.kr/privkey.pem;
7+
8+
root /usr/share/nginx/html;
9+
index index.html;
710

811
# React Router를 위한 설정
912
location / {
10-
root /usr/share/nginx/html;
11-
index index.html;
1213
try_files $uri $uri/ /index.html;
1314
}
1415

nginx.conf.template

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
server {
2-
listen 443 ssl;
3-
server_name cs25.co.kr www.cs25.co.kr;
2+
listen 443 ssl;
3+
server_name cs25.co.kr www.cs25.co.kr;
4+
5+
ssl_certificate /etc/letsencrypt/live/cs25.co.kr/fullchain.pem;
6+
ssl_certificate_key /etc/letsencrypt/live/cs25.co.kr/privkey.pem;
7+
8+
root /usr/share/nginx/html;
9+
index index.html;
410

5-
ssl_certificate /etc/letsencrypt/live/cs25.co.kr/fullchain.pem;
6-
ssl_certificate_key /etc/letsencrypt/live/cs25.co.kr/privkey.pem;
711

812
# React Router를 위한 설정
913
location / {
10-
root /usr/share/nginx/html;
11-
index index.html;
1214
try_files $uri $uri/ /index.html;
1315
}
1416

17+
1518
# API 요청 프록시
1619
location /api/ {
1720
proxy_pass ${VITE_API_URL}/api/;

0 commit comments

Comments
 (0)