How to use Nginx as a reverse proxy for a blog by configuring nginx.conf wa proxy_pass

I am working on making my site on mysite.com/blog show my tumblr blog without the tumblr url.

I am using NGINX and updated nginx.conf with the following:

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; } } 

This is an error without an error message. Any ideas what I'm doing wrong here? Thanks

+4
source share
2 answers

This nginx gist can help with setting the reverse proxy for your Tumblr blog. Definitely worth the subfolder, not the subdomain of your blog for SEO purposes.

+2
source

How to simply use your own domain name as such: http://www.tumblr.com/docs/en/custom_domains

You may need to change the URL scheme on blog.mysite.com, but it has the huge advantage of traffic going to tumblr servers, directly forcing you to proxy through your server. If your blog receives a lot of traffic, your servers may be overloaded. In addition, cybercriminals can abuse your proxy server to launch tumblr attacks that will then appear on your server.

-1
source

Source: https://habr.com/ru/post/1447118/


All Articles