mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #5015] Can't serve 404 page if https #3946
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#3946
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 @gregoiregentil on GitHub (Oct 9, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/5015
Bug Description
First, thank you for this amazing project. It's very stable.
In 0.63, it's not possible to serve a 404 error page for https due to the lack of option to stipulate the certificate.
vhostHTTPPort = 80
vhostHTTPSPort = 443
custom404Page = "404.html"
#certFile = "/path/fullchain.pem"
#keyFile = "/path/privkey.pem"
Am I missing something or could it be "fixed"/added?
frpc Version
0.63.0
frps Version
0.63.0
System Architecture
Linux/amd64
Configurations
vhostHTTPPort = 80
vhostHTTPSPort = 443
custom404Page = "404.html"
#certFile = "/path/fullchain.pem"
#keyFile = "/path/privkey.pem"
Logs
http://example.com WORKING
2025-10-09 16:02:35.809 [W] [httputil/reverseproxy.go:486] do http proxy request [host: example.com] error: no route found: example.com /
https://example.com NOT WORKING
2025-10-09 16:02:34.464 [D] [vhost/vhost.go:218] http request for host [example.com] path [] httpUser [] not found
Steps to reproduce
No response
Affected area
@fatedier commented on GitHub (Oct 11, 2025):
This is the current expected behavior. The custom404Page setting is applied after the request has been routed. For HTTPS, the server must first complete the TLS handshake and present a certificate before it can send any content. Today, frps does not expose a server-wide “default certificate” for the vhost HTTPS listener, so when a request doesn’t match any configured HTTPS proxy, there’s no cert to use and your custom 404 page can’t be returned. (You can see custom404Page, vhostHTTPPort, and vhostHTTPSPort in the server config reference, but there’s no global HTTPS certificate option there.)
@gregoiregentil commented on GitHub (Oct 11, 2025):
Thank you for the project and thank you for the answer.
I follow you. " Today, frps does not expose a server-wide “default certificate” for the vhost HTTPS listener". We agree and that's why I put "#certFile...". So my "issue" should be re-qualified as a "feature suggestion".
@fatedier commented on GitHub (Oct 11, 2025):
Given how frp currently handles HTTPS, this isn’t possible. There are no plans to support it in the short term.
@gregoiregentil commented on GitHub (Oct 11, 2025):
Got you.