기본적인 라우팅
# Common Routing
server {
listen 80;
listen [::]:80;
server_name _;
location / {
root /home/username/public_html/;
index index.html;
try_files $uri $uri/ =404;
}
}
Plain Text
리액트 라우팅
# React Routing
server {
listen 80;
listen [::]:80;
server_name _;
location / {
root /home/username/public_html/;
index index.html;
try_files $uri $uri/ /index.html;
}
}
Plain Text
리버스 프록시
# Reverse Proxy
server {
listen 80;
listen [::]:80;
server_name _;
location / {
proxy_pass http://localhost:3000;
}
}
Plain Text