1 Star 0 Fork 46

镜花/黑马顺风车

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
nginx.conf 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
心飞为你飞 提交于 2023-03-20 22:57 . 添加dosc
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr -> $upstream_addr [$time_local] "$request" '
'$status ';
access_log /Users/wangshouwen/Desktop/access.log main;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
sendfile on;
keepalive_timeout 65;
#允许header下划线,否则token过不去,【重要】!
underscores_in_headers on;
#后台微服务网关的地址
upstream backend {
# 修改成自己的IP
server 127.0.0.1:10010;
# server 116.62.213.90:10010;
}
server {
listen 80;
server_name localhost;
location /web {
root /Users/wangshouwen/src/hitch/ ;
index login.html;
}
#fdfs的地址
location /group1 {
# 修改成自己的IP
proxy_pass http://116.62.213.90:10021;
}
#websocket代理
location = /notice/ws/socket {
proxy_pass http://backend;
# proxy_set_header Host $host:$server_port;
proxy_connect_timeout 10s;
proxy_read_timeout 7200s;
proxy_send_timeout 10s;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location ~* /(account|notice|order|payment|storage|stroke)/ {
proxy_pass http://backend;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hiphops/hitch.git
git@gitee.com:hiphops/hitch.git
hiphops
hitch
黑马顺风车
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385