🔖 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)$ {}
|
||||
}
|
|
@ -16,7 +16,7 @@ http {
|
|||
client_body_buffer_size 128k;
|
||||
|
||||
#common header set
|
||||
proxy_http_version 1.1;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
|
Loading…
Reference in New Issue