🔖 nginx conf
parent
1fa717faba
commit
3a0917023e
|
@ -0,0 +1,20 @@
|
|||
# puck 开发环境配置
|
||||
upstream backend {
|
||||
server 127.0.0.1:9040;
|
||||
}
|
||||
|
||||
# puck server
|
||||
server {
|
||||
listen 80;
|
||||
server_name www.demo04.com;
|
||||
|
||||
# windows 下前后端分离场景,使用相对路径无法被识别,暂时搞不定
|
||||
root D:/codes/zp/java/Nginx/demos/reactapp/dist;
|
||||
|
||||
location ~ ^/api/ {
|
||||
proxy_pass http://backend;
|
||||
rewrite "^/api/(.*)$" /$1 break;
|
||||
}
|
||||
|
||||
location ~* \.(json|txt|js|css|jpg|jpeg|gif|png|svg|ico|eot|otf|woff|woff2|ttf)$ {}
|
||||
}
|
Loading…
Reference in New Issue