Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First, nginx does not send Host header to the blog.superfeedr.com. This makes it send all the required headers:</p> <pre> proxy_set_header Host blog.superfeedr.com; proxy_set_header X-Host blog.superfeedr.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; </pre> <p>Second, some url rewriting required. By some weird reason this depends on the version of nginx you are using. Anyway, for 0.6.x (0.6.32 for me) this should work:</p> <pre> location /blog { rewrite ^/blog(.*)$ /$1 last; error_page 402 = @blog; return 402; } location @blog { proxy_pass http://blog.superfeedr.com; # the rest of proxying parameters should be here proxy_set_header Host blog.superfeedr.com; proxy_set_header X-Host blog.superfeedr.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } </pre> <p>You also need to cover all the paths the blog refers to (css, images etc), e.g.</p> <pre> location /css { error_page 402 = @blog; return 402; } </pre> <p>For 0.7.59:</p> <pre> location /blog { set $blog 1; rewrite ^/blog(.*)$ /$1 last; } location /css { set $blog 1; error_page 402 = @blog; return 402; } location / { if ($blog) { error_page 402 = @blog; return 402; } # here is where default settings for / should be root /usr/local/www/nginx/; } location @blog { proxy_pass http://blog.superfeedr.com; # the rest of proxying parameters should be here proxy_set_header Host blog.superfeedr.com; proxy_set_header X-Host blog.superfeedr.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload