24 lines
573 B
Plaintext
24 lines
573 B
Plaintext
|
|
server {
|
||
|
|
listen 8001;
|
||
|
|
server_name _;
|
||
|
|
|
||
|
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||
|
|
|
||
|
|
location /static/ {
|
||
|
|
alias /home/ubuntu/diary-system/backend/static/;
|
||
|
|
}
|
||
|
|
|
||
|
|
location /api/ {
|
||
|
|
proxy_pass http://127.0.0.1:8002;
|
||
|
|
proxy_set_header Host $host;
|
||
|
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
|
}
|
||
|
|
|
||
|
|
location / {
|
||
|
|
root /home/ubuntu/diary-system/frontend;
|
||
|
|
index index.html;
|
||
|
|
try_files $uri $uri/ /index.html;
|
||
|
|
}
|
||
|
|
}
|