[GH-ISSUE #1935] Frp 穿透 nginx 服务异常 #1537

Closed
opened 2026-05-05 12:58:29 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @liuweiGL on GitHub (Aug 7, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1935

What version of frp are you using (./frpc -v or ./frps -v)?

  • ./frpc -v:0.33.0
  • ./frps -v:0.33.0

What operating system and processor architecture are you using (go env)?

4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Configures you used:

  1. 服务端配置:
[common]
bind_port = ****

vhost_http_port=80
vhost_https_port=443
subdomain_host = frp.eastcoal.club
  1. 客户端配置:
[common]
server_addr = 139.224.113.234
server_port = ****

[139.224.113.234]
type = http
local_ip = 139.224.113.234
local_port = 8088
subdomain = test

Steps to reproduce the issue:

  1. 安装 nginx/1.17.9
  2. 添加测试配置:
  • test1.conf
server {
        listen 8088;
        server_name default;

        location / {
                return 500;
        }
}
  • test2.conf
server{
        listen 8088;
        server_name localhost 139.224.113.234;

        location / {
                return 403;
        }
}

  1. 访问 test.frp.eastcoal.club

Describe the results you received:

image

Describe the results you expected:
{AE5E09B3-B915-4494-8ECF-4E9A09C91297}_20200808021533

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)

Originally created by @liuweiGL on GitHub (Aug 7, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1935 **What version of frp are you using (./frpc -v or ./frps -v)?** - `./frpc -v`:0.33.0 - `./frps -v`:0.33.0 **What operating system and processor architecture are you using (`go env`)?** ``` 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux ``` **Configures you used:** 1. 服务端配置: ```ini [common] bind_port = **** vhost_http_port=80 vhost_https_port=443 subdomain_host = frp.eastcoal.club ``` 2. 客户端配置: ```ini [common] server_addr = 139.224.113.234 server_port = **** [139.224.113.234] type = http local_ip = 139.224.113.234 local_port = 8088 subdomain = test ``` **Steps to reproduce the issue:** 1. 安装 `nginx/1.17.9` 2. 添加测试配置: - test1.conf ```conf server { listen 8088; server_name default; location / { return 500; } } ``` - test2.conf ```conf server{ listen 8088; server_name localhost 139.224.113.234; location / { return 403; } } ``` 3. 访问 [test.frp.eastcoal.club](http://test.frp.eastcoal.club) **Describe the results you received:** ![image](https://user-images.githubusercontent.com/21048878/89675983-692c2080-d91d-11ea-9ab5-b346584b12bc.png) **Describe the results you expected:** ![{AE5E09B3-B915-4494-8ECF-4E9A09C91297}_20200808021533](https://user-images.githubusercontent.com/21048878/89675972-629da900-d91d-11ea-8289-6f607af685fe.jpg) **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@liuweiGL commented on GitHub (Aug 7, 2020):

实际场景中的 nginx 服务并不归我管理,所以没法调整 nginx,只能在 frp 这边寻求帮助。。。

<!-- gh-comment-id:670651559 --> @liuweiGL commented on GitHub (Aug 7, 2020): 实际场景中的 nginx 服务并不归我管理,所以没法调整 nginx,只能在 frp 这边寻求帮助。。。
Author
Owner

@liuweiGL commented on GitHub (Aug 8, 2020):

客户端配置加个:

host_header_rewrite = 10.1.9.43
<!-- gh-comment-id:670839286 --> @liuweiGL commented on GitHub (Aug 8, 2020): 客户端配置加个: ```ini host_header_rewrite = 10.1.9.43 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1537
No description provided.