Skip to content

Instantly share code, notes, and snippets.

@goopi
Created September 4, 2013 17:17
Show Gist options
  • Save goopi/6439967 to your computer and use it in GitHub Desktop.
Save goopi/6439967 to your computer and use it in GitHub Desktop.
An example of proxying a Tumblr blog as a subdirectory in nginx (w/o regexs)
server {
# ...
location / {
proxy_set_header Accept-Encoding '';
proxy_pass http://<NAME>.tumblr.com/;
sub_filter http://<NAME>.tumblr.com/post /post;
sub_filter_once off;
}
location /post {
proxy_set_header Accept-Encoding '';
proxy_pass http://<NAME>.tumblr.com/post;
sub_filter http://<NAME>.tumblr.com/post /post;
sub_filter_once off;
}
# ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment