title |
date |
tags |
categories |
nginx에서 자주 사용하는 문법 |
2020-02-25 19:34:00 -0800 |
|
|
# Common Routing
server {
listen 80;
listen [::]:80;
server_name _;
location / {
root /home/username/public_html/;
index index.html;
try_files $uri $uri/ =404;
}
}
# React Routing
server {
listen 80;
listen [::]:80;
server_name _;
location / {
root /home/username/public_html/;
index index.html;
try_files $uri $uri/ /index.html;
}
}
# Reverse Proxy
server {
listen 80;
listen [::]:80;
server_name _;
location / {
proxy_pass http://localhost:3000;
}
}