当前位置:   article > 正文

微信公众号 frp 配置_微信公众号httpproxyhost

微信公众号httpproxyhost

nginx 配置中增加

server { listen 80;

server_name weixin.****.com;

location / {

proxy_pass http://127.0.0.1:8080;

proxy_set_header Host $host:80;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_hide_header X-Powered-By;

}

}

  1. # 代理http web
  2. server {
  3. listen 80;
  4. server_name weixin.****.com;
  5. location / {
  6. proxy_pass http://127.0.0.1:8080;
  7. proxy_set_header Host $host:80;
  8. proxy_set_header X-Real-IP $remote_addr;
  9. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  10. proxy_hide_header X-Powered-By;
  11. }
  12. }
  13. # 如果启用SSL
  14. server {
  15. listen 443 ssl http2;
  16. server_name weixin.*****.com;
  17. ssl on;
  18. ssl_certificate /root/2617988_weixin.*****.com.pem;
  19. ssl_certificate_key /root/2617988_weixin.*****.com.key;
  20. ssl_prefer_server_ciphers on;
  21. ssl_session_timeout 60m;
  22. location / {
  23. proxy_pass http: //127.0.0.1:8080;
  24. proxy_set_header Host $host;
  25. proxy_set_header X-Real-IP $remote_addr;
  26. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  27. proxy_hide_header X-Powered-By;
  28. }
  29. }

重启nginx

启动 Nginx:systemctl start nginx

停止 Nginx:systemctl stop nginx

frp服务端一键安装脚本

https://github.com/MvsCode/frps-onekey

Usage: /etc/init.d/frps {start|stop|restart|status|config|version}

frps 服务端配置

  1. # [common] is integral section
  2. [common]
  3. # A literal address or host name for IPv6 must be enclosed
  4. # in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
  5. bind_addr = 0.0.0.0
  6. bind_port = 5443
  7. # udp port used for kcp protocol, it can be same with 'bind_port'
  8. # if not set, kcp is disabled in frps
  9. kcp_bind_port = 5443
  10. # if you want to configure or reload frps by dashboard, dashboard_port must be set
  11. dashboard_port = 6443
  12. # dashboard assets directory(only for debug mode)
  13. dashboard_user = admin
  14. dashboard_pwd = o0ub5IhW
  15. # assets_dir = ./static
  16. vhost_http_port = 8080
  17. vhost_https_port = 4433
  18. # console or real logFile path like ./frps.log
  19. log_file = ./frps.log
  20. # debug, info, warn, error
  21. log_level = error
  22. log_max_days = 3
  23. # auth token
  24. token = 73GHh4Vs2Oqk0NkX
  25. # It is convenient to use subdomain configure for http、https type when many people use one frps server together.
  26. subdomain_host = 23.234.207.131
  27. # only allow frpc to bind ports you list, if you set nothing, there won't be any limit
  28. #allow_ports = 1-65535
  29. # pool_count in each proxy will change to max_pool_count if they exceed the maximum value
  30. max_pool_count = 50
  31. # if tcp stream multiplexing is used, default is true
  32. tcp_mux = true

fpr客户端配置

  1. [common]
  2. #填服务器的ip
  3. server_addr = 45.77.22.40
  4. server_port = 5443
  5. token = KKKK3vlidz4oMhdx
  6. pool_count = 5
  7. [web]
  8. #配置类型为http协议
  9. type = http
  10. local_ip = 127.0.0.1
  11. #内网需要监听的端口(win10所启服务端口)
  12. local_port = 80
  13. custom_domains = weixin.****.com

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/506179
推荐阅读
相关标签
  

闽ICP备14008679号