无ssl证书镜像
server { listen 80; server_name g.fxnetw.com; location / { proxy_pass https://www.google.com; proxy_connect_timeout 120; proxy_read_timeout 600; proxy_send_timeout 600; send_timeout 600; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
ssl加密访问https
server { listen 80; listen 443 ssl http2; server_name g.fxnetw.com;#改为你的域名或你vps的ip ssl on; ssl_certificate /www/wwwroot/cate.pem;#证书地址,可以自己新建文件,存放。自己改。 ssl_certificate_key /www/wwwroot/key;秘钥地址,自己放哪,自己改 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_session_timeout 10m; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_buffer_size 1400; location / { proxy_redirect off; proxy_pass https://www.google.com.hk; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Accept-Encoding ""; proxy_set_header Accept-Language "zh-CN"; } }
server_name 填你的域名,proxy_pass 填你要镜像的域名
proxy_pass填要反向代理的域名,google最近有些镜像会跳到一个叫ipv4.google.com的域名,自己琢磨,有时候可以,有时候不行。
本文作者:风雪,转载时请注明本文出处:https://www.fxnetw.com/9.html
共
0
条评论