加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
nginx.conf 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
zhennann 提交于 2021-11-19 16:17 . chore: docker-compose
server {
listen 8000;
server_name localhost;
set $node_ip 127.0.0.1;
set $node_port 7102;
set $projectName cabloy-source;
root /Users/yangjian/Documents/temp/$projectName/dist/web;
location /public {
root /Users/yangjian/cabloy/$projectName;
internal;
}
location /api/ {
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://$node_ip:$node_port$request_uri;
proxy_redirect off;
proxy_buffer_size 64k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
}
location /socket.io/ {
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://$node_ip:$node_port$request_uri;
proxy_redirect off;
proxy_buffer_size 64k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化