mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #124] 如果服务器上80端口被占用的话 只能选择别的端口吗? #67
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#67
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 @iscraft on GitHub (Sep 30, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/124
想通过服务器的80做内网的微信开发相关
但服务器的80端口已经被占用
那么无论在iis里新建站点并绑定测试域名
是否都无法通过测试域名:80来访问到内网web呢
log为Create vhost http listener error,......bind: An attempt was made to access a socket in a way forbidden by its access permissions.
@JimLee1996 commented on GitHub (Oct 6, 2016):
by using nginx reverse proxy
@mbj2014 commented on GitHub (Oct 8, 2016):
nginx反向代理是不是要做到IIS和frp前面?即由nginx来监听80端口,根据域名的不同,分到IIS或者frep。这样公网服务器既可以自己做网站服务,又可以提供穿透内网发布Web?
这样原来的IIS主机头就不用了,而是由ngnix来实现?
@JimLee1996 commented on GitHub (Oct 8, 2016):
嗯嗯,非常对
@iscraft commented on GitHub (Oct 10, 2016):
iis下已解决 @JimLee1996 谢谢 改天找nginx环境测试
@netll commented on GitHub (Mar 3, 2019):
iis下是怎么解决的,我也遇到这个问题
@iscraft commented on GitHub (Mar 3, 2019):
@tt2014 时间有点久 具体操作忘记了 是通过iis的url重写规则做的
@netll commented on GitHub (Mar 6, 2019):
url重写规则具体是怎么填写参数,我弄的不成功,大佬方便详细讲下吗
@Thyiad commented on GitHub (May 20, 2019):
@tt2014 老板搞定了没?因为我发现iis就算rewirte之后,还是只能通过frp绑定的端口访问,而不是80端口
@Thyiad commented on GitHub (May 20, 2019):
搞定了,match规则里面正则验证{HTTP_HOST},Rewrite Url配置成:
http://{C:0}:【frp端口】
就OK了
哎,nginx配置一条
proxy_set_header Host $host:80;
就行了,大把资料,IIS就是没啥用人,得多尝试,才搞清楚。
如果直接访问127.0.0.1,不属于指定的域名,访问会失败的。猜测nginx这是直接改变请求的Host,而IIS找不到这种配置,目测还是通过外网访问的HOST:【frp端口】
@chenjunyi88 commented on GitHub (Feb 3, 2022):
@Thyiad 受你启发,http://{C:0}:【frp端口】后再加上/{R:1},IIS的配置就完美了
@1115284051 commented on GitHub (Mar 16, 2023):
的确是这样
@Thyiad commented on GitHub (Mar 16, 2023):
@chenjunyi88 @1115284051 我最终是这样配置的,比你们贴的更简洁,仅供参考: