title: Nginx Proxy for a GitHub Page?
body: <p>We have a blog that we host on github with Jekyll; it is there : <a href="http://blog.superfeedr.com" rel="nofollow noreferrer">http://blog.superfeedr.com</a> </p>
  
  <p>Ideally, I want it to be at <a href="http://superfeedr.com/blog/" rel="nofollow noreferrer">http://superfeedr.com/blog/</a> because we need to add some AJAX and we need to avoid the "Same Origin Policy" problems.</p>
  
  <p>We use Nginx on our "main" webserver, and I have the following setup :</p>
  
  <pre><code>location /blog/ {
  
  proxy_pass http://blog.superfeedr.com/;
      proxy_redirect     off;
      proxy_max_temp_file_size 0;
  
      client_max_body_size       10m;
      client_body_buffer_size    128k;
  
      proxy_connect_timeout      90;
      proxy_send_timeout         90;
      proxy_read_timeout         90;
  
      proxy_buffer_size          4k;
      proxy_buffers              4 32k;
      proxy_busy_buffers_size    64k;
      proxy_temp_file_write_size 64k;
  }
  </code></pre>
  
  <p>Unfortunately, as you can see if you go to <a href="http://superfeedr.com/blog/" rel="nofollow noreferrer">http://superfeedr.com/blog/</a> this obviously doesn't work. Oddly enough, we're redirected to Github's homepage.</p>
  
  <p>PS: obviously, we could host the blog on our main server, but the goal is to host it on a different host so that we can almost guarantee it to be online if the site is down...</p>