-
-
Save HuanMeng0/9da2b7a3bc5792b244e9a8826783902c to your computer and use it in GitHub Desktop.
仿制联通缓存服务器
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443; | |
server_name 主机名; | |
ssl on; | |
ssl_certificate 证书; | |
ssl_certificate_key 密钥; | |
location ~/([^/]*)/(.*) { | |
resolver 8.8.8.8; | |
set $c_host $1; | |
set $c_uri $2; | |
proxy_pass http://$c_host/$c_uri; | |
proxy_buffering off; | |
proxy_set_header Accept-Encoding ""; | |
proxy_set_header Host $c_host; | |
proxy_set_header X-Real-Ip $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Referer http://$c_host; | |
proxy_set_header User-Agent $http_user_agent; | |
proxy_redirect off; | |
subs_filter_types text/css text/xml text/javascript; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment