[GH-ISSUE #314] 伸手求一则nginx转发https的配置 #232

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

Originally created by @rosystain on GitHub (May 12, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/314

内网无法获得SSL证书
我使用自签的证书通过https反代nginx到frp后能够正常通过vhost的https端口访问。
当然证书肯定是不被信任的。
于是在服务端配置另一个nginx反代frp的https端口,使用了正常签发的证书,访问显示bad 502
所以整个过程应该是
nginx --> frpc --> frps --> nginx
问题肯定是出在frps --> nginx 这个环节上。
配置如下

listen 443 ssl http2;
ssl on;
ssl_certificate /usr/local/nginx/ssl/nextcloud/214097145250830.pem;
ssl_certificate_key /usr/local/nginx/ssl/nextcloud//214097145250830.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/nextcloud.access.log;
error_log /var/log/nginx/nextcloud.error.log;
client_max_body_size 1000m;
location / {
proxy_pass https://127.0.0.1:4433;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}

Originally created by @rosystain on GitHub (May 12, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/314 内网无法获得SSL证书 我使用自签的证书通过https反代nginx到frp后能够正常通过vhost的https端口访问。 当然证书肯定是不被信任的。 于是在服务端配置另一个nginx反代frp的https端口,使用了正常签发的证书,访问显示bad 502 所以整个过程应该是 nginx --> frpc --> frps --> nginx 问题肯定是出在frps --> nginx 这个环节上。 配置如下 > listen 443 ssl http2; > ssl on; > ssl_certificate /usr/local/nginx/ssl/nextcloud/214097145250830.pem; > ssl_certificate_key /usr/local/nginx/ssl/nextcloud//214097145250830.key; > ssl_session_timeout 5m; > ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; > ssl_protocols TLSv1 TLSv1.1 TLSv1.2; > ssl_prefer_server_ciphers on; > access_log /var/log/nginx/nextcloud.access.log; > error_log /var/log/nginx/nextcloud.error.log; > client_max_body_size 1000m; > location / { > proxy_pass https://127.0.0.1:4433; > proxy_redirect off; > proxy_set_header X-Real-IP $remote_addr; > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; > proxy_set_header Host $http_host; > proxy_set_header X-NginX-Proxy true; > }
Author
Owner

@fatedier commented on GitHub (May 18, 2017):

issue 仅用于反馈 bug,建议在其他平台寻求帮助。

<!-- gh-comment-id:302505235 --> @fatedier commented on GitHub (May 18, 2017): issue 仅用于反馈 bug,建议在其他平台寻求帮助。
Author
Owner

@lcl1995225 commented on GitHub (Jul 26, 2018):

我也遇到了rosystain的问题,请问rosystain解决了吗?

内网无法获得SSL证书
我使用自签的证书通过https反代nginx到frp后能够正常通过vhost的https端口访问。
当然证书肯定是不被信任的。
于是在服务端配置另一个nginx反代frp的https端口,使用了正常签发的证书,访问显示bad 502
所以整个过程应该是
nginx --> frpc --> frps --> nginx
问题肯定是出在frps --> nginx 这个环节上。

<!-- gh-comment-id:408090207 --> @lcl1995225 commented on GitHub (Jul 26, 2018): 我也遇到了rosystain的问题,请问rosystain解决了吗? > 内网无法获得SSL证书 我使用自签的证书通过https反代nginx到frp后能够正常通过vhost的https端口访问。 当然证书肯定是不被信任的。 于是在服务端配置另一个nginx反代frp的https端口,使用了正常签发的证书,访问显示bad 502 所以整个过程应该是 nginx --> frpc --> frps --> nginx 问题肯定是出在frps --> 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#232
No description provided.