Closed ansonken closed 9 months ago
Nginx stream 模块
stream { upstream frp { server x.x.x.x:7000; # 您的FRPS服务器IP地址和bind_port }
server {
listen 443;
proxy_pass frp;
}
}
我现在的宝塔面板nginx 配置一些website 用来通过443端口转发流量,来做梯子,还有配置了一些website 通过443端口来访问家里的nas; 在主配置文件启用了上面的配置后,NGINX 就起不来了,好像是端口冲突了。 如果删除了所有website ,按照上面代码配置,frps 是可以正常使用。 梯子website 配置文件: location ^~ /data3838 { proxy_redirect off; proxy_pass http://127.0.0.1:21737; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host;
# Show realip in v2ray access.log
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
if ($http_user_agent ~* "360Spider|JikeSpider|Spider|spider|bot|Bot|2345Explorer|curl|wget|webZIP|qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot|NSPlayer|bingbot")
{
return 403;
}
location
它在 http 模块 里的 server 块
Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Describe the feature request
环境: 1、公网服务器:安装了nginx 和frps ,公网服务器的安全组只放通443端口; 2、内网服务器: 需求发布https业务,服务器安装了frpc; 需求场景:希望公网服务器只暴露443端口,内网的frpc 连接公网服务器 frps bind_port 端口的时候,连接流量走443端口转发到frps的7000端口。
Describe alternatives you've considered
No response
Affected area