Loading... # Nginx反向代理Frps服务 ## 需求 我有一个服务器,我在上面运行了网站与内网穿透服务,为了防止冲突内网穿透服务的端口与网站的端口不同,于是在访问服务时每次都要输入一个附加的端口,很麻烦。 解法,使用Nginx进行反向代理,在我的例子中,内网穿透的例子为`http://media.lolisis.com:6503 https://media.lolisis.com:6504` ## 解决 首先打开宝塔面板,创建反向代理网站。  然后添加反向代理  目标URL填http访问内网穿透服务的地址,比如我填`http://media.lolisis.com:6503` 右边保持$host不要动  此时已经能访问了,但访问的是http端口  添加https访问 打开宝塔的https证书配置,填入这个网站的证书(假设你配置内网穿透时已经有了证书)。打开强制https,就可以了。  ## 网速测试 我的服务器为30Mb,经过测试,下载东西速度为2MB,不论有没有使用反向代理,那么速度损失出现在别的地方。我在想另外2MB去哪里了。 ## 相关网址指路 [Docker系列 通过FRP实现内网穿透](https://blog.csdn.net/huangwb8/article/details/125263390) [FRP配置官方文档](https://www.cnblogs.com/hahaha111122222/p/8508741.html) [阿里云有免费证书拿一年20个](https://yundun.console.aliyun.com/) Last modification:January 11, 2023 © Allow specification reprint Like 如果觉得我的文章对你有用,请留下评论。