Created
July 9, 2016 15:31
-
-
Save gaoyichuan/2a6341d1dc273201f1595fbcbd23e31b to your computer and use it in GitHub Desktop.
nginx nmzsks reverse proxy
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 80; | |
server_name nmzsks.daoapp.io; | |
location / { | |
set $referer $http_referer; | |
if ($http_referer ~ '^(http://)nmzsks.daoapp.io(/.+)$') { | |
set $referer $1www1.nm.zsks.cn$2; | |
} | |
proxy_pass http://www1.nm.zsks.cn; | |
proxy_set_header Host "www1.nm.zsks.cn"; | |
proxy_set_header Accept "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"; | |
proxy_set_header Accept-Encoding "gzip, deflate"; | |
proxy_set_header Upgrade-Insecure-Requests 1; | |
proxy_set_header User-Agent $http_user_agent; | |
proxy_set_header Accept-Language "en,zh-CN;q=0.8,zh;q=0.6,en-US;q=0.4"; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Referer $referer; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment