title: Redirect to 127.0.0.1 when access a wordpress hosted with apache and nginx in proxy
body: <p>I have a wordpress hosted on Apache2 with Nginx in front of.<code>
  &lt;WORLD&gt; ===&gt; &lt;NGINX PROXY&gt; --&gt; APACHE/DOCKER/STATIC WEBSITE etc...
  </code></p>
  
  <p>My nginx conf for wordpress proxy is :</p>
  
  <pre><code>server {
      server_name dev-www.example.com;
  
      location / {
          proxy_pass http://127.0.0.1:13400;
      }
  }
  </code></pre>
  
  <p>My apache configuration :</p>
  
  <pre><code>Listen 13400
  
  &lt;VirtualHost 127.0.0.1:13400&gt;
          CustomLog /var/log/httpd/sites/dev-www/access_log combined
          ErrorLog /var/log/httpd/sites/dev-www/error_log
  
          DirectoryIndex index.php
  
          DocumentRoot /var/www/sites/example.com/dev-www
  
          RewriteEngine On
  
          &lt;Directory /var/www/sites/example.com/dev-www/&gt;
                  Options Indexes FollowSymLinks
                  AllowOverride all
          &lt;/Directory&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>And wordpress <code>.htaccess</code> :</p>
  
  <pre><code># BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>The issue is when I go on  <code>dev-www.example.com/foobar.php</code> I am redirected to <code>127.0.0.1/foobar.php</code>. I know it's from <code>nginx</code> configuration <code>127.0.0.1</code> pop out put how to fix it ?</p>
  
  <p>I try to proxy pass to <code>dev-www.example.com:13400</code> but I got an infinite loop :</p>
  
  <blockquote>
    <p>[Tue May 10 23:44:45.001680 2016] [core:error] [pid 1096] [client
    127.0.0.1:54887] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use
    'LimitInternalRecursion' to increase the limit if necessary. Use
    'LogLevel debug' to get a backtrace., referer:
    <a href="http://dev-www.example.com/" rel="nofollow">http://dev-www.example.com/</a></p>
  </blockquote>
  
  <p>note: there is no problem with <code>http://dev-www.example.com</code> or <code>http://dev-www.example.com/index.php</code>
  Thanks.</p>
  
  <p>note2 : If I change nginx configuration to localhost:13400, then i'm redirected to localhost/login-3. It looks like .htaccess redirect to ServName and it is 127.0.0.1</p>