mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1009] 客户单多个子域名网站能否使用nginx实现子域名转发以便使用80/443端口 #797
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#797
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ddzzhen on GitHub (Dec 15, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/1009
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)?
0.22.0
What operating system and processor architecture are you using (
go env)?server-ubuntu18.04
client-proxmox
Configures you used:
本地:
proxmox宿主机, 群晖, openwrt, d12g路由, dns, dellr420
5个网站,2个ssh,1个dns
目前能够正常使用,包括ssh, dns, http和https,都能正常访问,使用的kcp协议.
问题是: 目前http和https使用的端口为10003和10004,而服务端本身部署的有nginx(占用了80和443),请问能否使用服务端的nginx实现对不同域名的转发,即能够实现左侧替代右侧进行访问,谢谢!
http://1.xxx.com website1.xxx.com:10003
https://2.xxx.com website2.xxx.com:10004
http://3.xxx.com website3.xxx.com:10003
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
如果使用 127.0.0.1:10003 或者127.0.0.1:10004无法实现多域名的端口转发
例如使用如下方法,实现对http的转发,无法实现多域名转发,因为客户端所有的子域名都是用的同一个端口.
location / {
proxy_pass http://127.0.0.1:10003;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Describe the results you expected:
如何能够实现子域名转发,或者能否实现?谢谢!
Additional information you deem important (e.g. issue happens only occasionally):
目前能够正常访问,除了需要输入端口(10003,10004)
Can you point out what caused this issue (optional)
@fatedier commented on GitHub (Dec 17, 2018):
请详细学习 nginx 的使用教程。