发布时间:2018-11-26编辑:佚名阅读(1866)
服务器端操作:
nginx:
server { listen 443; server_name https域名; ssl on; ssl_certificate 证书1; ssl_certificate_key 证书2; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; location / { if ($args ~* "redirect:") { return 403; } if ($args ~* "action:") { return 403; } if ($args ~* "redirectAction:") { return 403; } if ($http_user_agent ~* "python|curl|java|wget|httpclient|okhttp") { return 503; } proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Proto $scheme; 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_redirect off; expires off; sendfile off; proxy_pass http://http域名:(本地的端口号); } } server { listen 80; server_name http域名; location / { proxy_pass http://http域名:(本地的端口号); proxy_redirect off; 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_set_header X-Scheme $scheme; } }
frps(服务器端):
[common] bind_addr = 服务器ip bind_port = 7000 bind_udp_port = 7001 kcp_bind_port = 7000 vhost_http_port = 本地服务端口 dashboard_port = 7500 dashboard_user = 账号 dashboard_pwd = 密码 privilege_mode = true privilege_token = 密码 #log_max_days = 7 max_pool_count = 100 #log_level = info #log_file = frps.log
frpc(本地操作):
[common] server_addr = 服务器ip server_port = 7000 privilege_token = 密码 #log_file = frpc.log #log_level = info #log_max_days = 7 [frpc.ilawedu.cn] type = http privilege_mode = true local_ip = 127.0.0.1 local_port = 本地服务端口 custom_domains = http域名 use_gzip = true [frps.ilawedu.cn] type = http privilege_mode = true local_ip = 127.0.0.1 local_port = 本地服务端口 custom_domains = https域名 use_gzip = true
上一篇:asp.net在线人数统计
0人
0人
0人
0人