我正在努力让我的网站mysite.com/blog显示没有tumblr URL的tumblr博客。
我使用的是NGINX,并由nginx.conf更新了以下内容:
location /blog {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
if (!-f $request_filename) {
rewrite ^/blog$ /;
rewrite ^/blog/(.*)$ /$1;
proxy_pass http://denise-puchol.tumblr.com/;
break;
}
}这是失败,但没有错误消息。你知道我哪里做错了吗?谢谢
发布于 2013-05-15 03:12:02
This nginx gist可以帮助你为Tumblr博客建立一个反向代理。用于搜索引擎优化的Definitely worthwhile to subfolder rather than subdomain your blog。
发布于 2012-11-20 10:13:54
如果只使用一个自定义域名,比如:http://www.tumblr.com/docs/en/custom_domains?
您可能需要将您的url方案更改为blog.mysite.com,但它有一个巨大的优势,即通过您的服务器将流量直接发送到tumblr的服务器。如果你的博客收到了大量的流量,你的服务器可能会不堪重负。此外,攻击者可能会滥用您的代理对tumblr发起攻击,然后看起来就像是来自您的服务器。
https://stackoverflow.com/questions/13465566
复制相似问题