Created
May 13, 2012 08:40
-
-
Save shellexy/2686973 to your computer and use it in GitHub Desktop.
在 vps 用 nginx 反向代理 wordpress/blogger
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
# /etc/nginx/sites-available/blog.shellexy.info | |
server { | |
resolver 8.8.8.8; | |
listen 80; | |
server_name blog.shellexy.info; | |
#access_log off; | |
access_log /var/log/nginx/blog.shellexy.info.access.log; | |
location / { | |
#避免远方启用压缩导致无法替换纯文本 | |
proxy_set_header Accept-Encoding ""; | |
#按需替换为您的 blogger | |
proxy_pass $scheme://shellexy.wordpress.com$request_uri; | |
sub_filter http://shellexy.wordpress.com http://blog.shellexy.info; | |
#替换全文所有文本 | |
sub_filter_once off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
不知道现在还能用吗