[GH-ISSUE #747] nginx 转发frp https协议失败 #585

Closed
opened 2026-05-05 12:22:46 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @abciop on GitHub (May 7, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/747

【Nginx配置】
server {
listen 443 ssl;
server_name *.frp.域名 ;
ssl on;
root html;
index index.html index.htm;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
ssl_certificate /usr/local/nginx/cert/214658359300118.pem;
ssl_certificate_key /usr/local/nginx/cert/214658359300118.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
keepalive_timeout 70;
proxy_set_header "Host" $host:443;
location / {
proxy_pass_header Server;
proxy_redirect https://$host:9443 https//$host;
proxy_pass https://127.0.0.1:9443;
proxy_buffer_size 64k;
proxy_buffers 32 32k;
proxy_busy_buffers_size 128k;
}
access_log off;
log_not_found off;
}

【frps.ini】

[common]
bind_port = 7000
vhost_http_port = 9080
vhost_https_port = 9443

【frpc.ini】
[common]
server_addr = 服务器IP
server_port = 7000

[webs-hxy]
type = https
local_port = 443
custom_domains = store.域名

请教各位大神,有没有配置成功的,能发份配置文件参考下

Originally created by @abciop on GitHub (May 7, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/747 【Nginx配置】 server { listen 443 ssl; server_name *.frp.域名 ; ssl on; root html; index index.html index.htm; add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; ssl_certificate /usr/local/nginx/cert/214658359300118.pem; ssl_certificate_key /usr/local/nginx/cert/214658359300118.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL; ssl_prefer_server_ciphers on; keepalive_timeout 70; proxy_set_header "Host" $host:443; location / { proxy_pass_header Server; proxy_redirect https://$host:9443 https//$host; proxy_pass https://127.0.0.1:9443; proxy_buffer_size 64k; proxy_buffers 32 32k; proxy_busy_buffers_size 128k; } access_log off; log_not_found off; } 【frps.ini】 [common] bind_port = 7000 vhost_http_port = 9080 vhost_https_port = 9443 【frpc.ini】 [common] server_addr = 服务器IP server_port = 7000 [webs-hxy] type = https local_port = 443 custom_domains = store.域名 请教各位大神,有没有配置成功的,能发份配置文件参考下
Author
Owner

@xiaoyell commented on GitHub (May 7, 2018):

其实时两个问题啊,nginx配置有没有问题和frp配置有没有问题啊,你先排除掉一个啊

<!-- gh-comment-id:386998035 --> @xiaoyell commented on GitHub (May 7, 2018): 其实时两个问题啊,nginx配置有没有问题和frp配置有没有问题啊,你先排除掉一个啊
Author
Owner

@fatedier commented on GitHub (May 7, 2018):

请先在 issue 里搜索相关问题。

<!-- gh-comment-id:387120966 --> @fatedier commented on GitHub (May 7, 2018): 请先在 issue 里搜索相关问题。
Author
Owner

@abciop commented on GitHub (May 8, 2018):

@fatedier 不通过Nginx转发,frps直接用443端口可以正常使用,但是把frps端口改成9443,Nginx通过443去转发,就没办法正常使用; http 是通过Nginx转发的没发现问题

<!-- gh-comment-id:387313944 --> @abciop commented on GitHub (May 8, 2018): @fatedier 不通过Nginx转发,frps直接用443端口可以正常使用,但是把frps端口改成9443,Nginx通过443去转发,就没办法正常使用; http 是通过Nginx转发的没发现问题
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#585
No description provided.