一直想更加合理的利用好自己服务器的资源,所以在服务器上部署了nginx+ngrok,使用nginx反向代理了8888端口的ngrok,ngrok使用三级域名作为隧道,部署过程参考:
通过nginx代理搭建自己的ngrok服务器
https://blog.csdn.net/qq_38254467/article/details/80940453
这里是我的配置
server {
listen 80;
server_name *.overthemountain.xyz;
location / {
proxy_redirect ~^http://(.*).overthemountain.xyz:8888(.*) http://$1.overthemountain.xyz$2;
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $http_host:8888;
proxy_set_header X