赞
踩
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;
}
}
-
- # 代理http web
- 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;
- }
- }
-
- # 如果启用SSL
- server {
- listen 443 ssl http2;
- server_name weixin.*****.com;
-
- ssl on;
- ssl_certificate /root/2617988_weixin.*****.com.pem;
- ssl_certificate_key /root/2617988_weixin.*****.com.key;
- ssl_prefer_server_ciphers on;
- ssl_session_timeout 60m;
-
- location / {
- proxy_pass http: //127.0.0.1:8080;
- proxy_set_header Host $host;
- 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;
- }
- }
重启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 服务端配置
- # [common] is integral section
- [common]
- # A literal address or host name for IPv6 must be enclosed
- # in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
- bind_addr = 0.0.0.0
- bind_port = 5443
- # udp port used for kcp protocol, it can be same with 'bind_port'
- # if not set, kcp is disabled in frps
- kcp_bind_port = 5443
- # if you want to configure or reload frps by dashboard, dashboard_port must be set
- dashboard_port = 6443
- # dashboard assets directory(only for debug mode)
- dashboard_user = admin
- dashboard_pwd = o0ub5IhW
- # assets_dir = ./static
- vhost_http_port = 8080
- vhost_https_port = 4433
- # console or real logFile path like ./frps.log
- log_file = ./frps.log
- # debug, info, warn, error
- log_level = error
- log_max_days = 3
- # auth token
- token = 73GHh4Vs2Oqk0NkX
- # It is convenient to use subdomain configure for http、https type when many people use one frps server together.
- subdomain_host = 23.234.207.131
- # only allow frpc to bind ports you list, if you set nothing, there won't be any limit
- #allow_ports = 1-65535
- # pool_count in each proxy will change to max_pool_count if they exceed the maximum value
- max_pool_count = 50
- # if tcp stream multiplexing is used, default is true
- tcp_mux = true
fpr客户端配置
-
- [common]
-
- #填服务器的ip
- server_addr = 45.77.22.40
- server_port = 5443
- token = KKKK3vlidz4oMhdx
- pool_count = 5
-
-
- [web]
- #配置类型为http协议
- type = http
- local_ip = 127.0.0.1
- #内网需要监听的端口(win10所启服务端口)
- local_port = 80
- custom_domains = weixin.****.com
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。