[GH-ISSUE #1193] Windows下的文件路径404 #934

Closed
opened 2026-05-05 12:35:41 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @so1999 on GitHub (Apr 11, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1193

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.25.0

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

Configures you used:

[file]
type = tcp
remote_port = 10001
plugin = static_file
# 要对外暴露的文件目录
**plugin_local_path = E:\nas**
# 访问 url 中会被去除的前缀,保留的内容即为要访问的文件路径
plugin_strip_prefix = static
plugin_http_user = admin
plugin_http_passwd = 

Steps to reproduce the issue:
Windows下文件的路径怎么写呢?按上面的写会报404

Describe the results you received:

Describe the results you expected:

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

Can you point out what caused this issue (optional)

Originally created by @so1999 on GitHub (Apr 11, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1193 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.25.0 **What operating system and processor architecture are you using (`go env`)?** Windows **Configures you used:** ```ini [file] type = tcp remote_port = 10001 plugin = static_file # 要对外暴露的文件目录 **plugin_local_path = E:\nas** # 访问 url 中会被去除的前缀,保留的内容即为要访问的文件路径 plugin_strip_prefix = static plugin_http_user = admin plugin_http_passwd = ``` **Steps to reproduce the issue:** Windows下文件的路径怎么写呢?按上面的写会报404 **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@GoGoogle commented on GitHub (Apr 19, 2019):

一样的,我试了很多种,都是404.
但我的版本是0.26.0

<!-- gh-comment-id:484776717 --> @GoGoogle commented on GitHub (Apr 19, 2019): 一样的,我试了很多种,都是404. 但我的版本是0.26.0
Author
Owner

@wubingyang commented on GitHub (Apr 26, 2019):

我也遇到了这个问题~不晓得是不是不支持

<!-- gh-comment-id:487107309 --> @wubingyang commented on GitHub (Apr 26, 2019): 我也遇到了这个问题~不晓得是不是不支持
Author
Owner

@phtwo commented on GitHub (Apr 28, 2019):

如果没有去掉 plugin_strip_prefix = static ,访问路径为 yourdomain.com/static/ ,看下是不是这个问题

<!-- gh-comment-id:487367588 --> @phtwo commented on GitHub (Apr 28, 2019): 如果没有去掉 `plugin_strip_prefix = static` ,访问路径为 `yourdomain.com/static/` ,看下是不是这个问题
Author
Owner

@GoGoogle commented on GitHub (Apr 29, 2019):

如果没有去掉 plugin_strip_prefix = static ,访问路径为 yourdomain.com/static/ ,看下是不是这个问题

感谢提醒,说明里面其实已经很清楚了,没仔细看,最后得加一个/

我现在版本是0.27.0,可以正常访问了。

<!-- gh-comment-id:487457795 --> @GoGoogle commented on GitHub (Apr 29, 2019): > 如果没有去掉 `plugin_strip_prefix = static` ,访问路径为 `yourdomain.com/static/` ,看下是不是这个问题 感谢提醒,说明里面其实已经很清楚了,没仔细看,最后得加一个/ 我现在版本是0.27.0,可以正常访问了。
Author
Owner

@ZlWcc commented on GitHub (Apr 30, 2019):

我在windows平台上同样遇到这个问题,然后进行了测试,发现有两个问题:
1、配置文件中的路径不能使用中文,否则会报404
2、使用过的端口指向的路径无法正常更新,即配置文件中虽然更改了路径且frpc进行重启,但还是会指向原来的位置。

通过 更换全英文路径+更换端口 后可以成功访问。

<!-- gh-comment-id:487841141 --> @ZlWcc commented on GitHub (Apr 30, 2019): 我在windows平台上同样遇到这个问题,然后进行了测试,发现有两个问题: 1、配置文件中的路径不能使用中文,否则会报404 2、使用过的端口指向的路径无法正常更新,即配置文件中虽然更改了路径且frpc进行重启,但还是会指向原来的位置。 通过 更换全英文路径+更换端口 后可以成功访问。
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#934
No description provided.