title: NGINX Proxy to wordpress website
body: <p>I have a statically served site (using nginx).
  I want to host a wordpress blog (hosted on a different instance) under /blog folder.
  When using a nginx proxy:</p>
  
  <pre><code>location /blog/ {
     proxy_set_header X-Is-Reverse-Proxy "true";
     proxy_set_header Host $host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $remote_addr;
     proxy_pass http://55.555.55.555;
  }
  </code></pre>
  
  <p>and the following wp-config.php:</p>
  
  <pre><code>define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
  define('WP_HOME', 'http://SOMESITE.com/blog/');
  </code></pre>
  
  <p>All the files from <code>wp-content</code> (and <code>wp-includes</code>) are not being served correctly, since they are being searched under <code>http://SOMESITE.com/wp-content/*</code>
  instead of <code>http://SOMESITE.com/blog/wp-content/*</code>.
  <br/></p>
  
  <p>Adding some extra proxy rules <strong>didn't work</strong>, ex:</p>
  
  <pre><code>location ~* (\/wp-content) {
     proxy_set_header X-Is-Reverse-Proxy "true";
     proxy_set_header Host $host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $remote_addr;
     proxy_pass http://55.555.55.555;
  }
  </code></pre>
  
  <p><strong>nor</strong> redefining the wp-config.php:</p>
  
  <pre><code>define('WP_SITEURL', 'http://SOMESITE.com/blog/');
  </code></pre>
  
  <p>Would love any ideas.
  I am also pretty sure it is a common use case, but couldn't find any working tricks here.</p>
  
  <p>THX.</p>