# Re: NginX problem with Reverse Proxy'ing

**URL:** <https://www.ruby-forum.com/t/re-nginx-problem-with-reverse-proxying/186660>\
**Category:** NGINX\
**Created:** [April 10, 2010, 9:18pm UTC](https://www.ruby-forum.com/t/re-nginx-problem-with-reverse-proxying/186660 "2010-04-10T21:18:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Fondevilla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@Victor\_Fondevilla](https://www.ruby-forum.com/u/Victor_Fondevilla)\
**Post date:** [April 10, 2010, 9:18pm UTC](https://www.ruby-forum.com/t/re-nginx-problem-with-reverse-proxying/186660/1 "2010-04-10T21:18:23Z")

</div>

Something went wrong with my other mail (created a new thread by  
mistake)

I paste here the message:

The PHP file is only this:

\<?php phpinfo(); ?\>

Just for testing the proxy.

---

<div class="post-metadata">

**Author:** ![Victor\_Fondevilla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@Victor\_Fondevilla](https://www.ruby-forum.com/u/Victor_Fondevilla)\
**Post date:** [April 10, 2010, 9:55pm UTC](https://www.ruby-forum.com/t/re-nginx-problem-with-reverse-proxying/186660/2 "2010-04-10T21:55:15Z")

</div>

Hello!

On Sat, Apr 10, 2010 at 09:17:58PM +0200, Victor Fondevilla wrote:

> The PHP file is only this:
> 
> \<?php phpinfo(); ?\>
> 
> Just for testing the proxy.

Are you sure? Check you apache configs then, looks like your test  
file isn’t hit at all dure to rewrites and so on.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Victor\_Fondevilla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@Victor\_Fondevilla](https://www.ruby-forum.com/u/Victor_Fondevilla)\
**Post date:** [April 11, 2010, 3:15pm UTC](https://www.ruby-forum.com/t/re-nginx-problem-with-reverse-proxying/186660/3 "2010-04-11T15:15:59Z")

</div>

I just restarted Nginx and Apache renaming log files to have fresh ones.  
Here are the snips from log:

Nginx Access Log  
83.97.217.199 - - [11/Apr/2010:12:41:51 +0000] “GET /index.php HTTP/1.1”  
301  
20 “-” “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;  
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media  
Center PC 6.0; InfoPath.2; Tablet PC 2.0)”

Apache Access Log  
127.0.0.1 - - [11/Apr/2010:12:41:51 +0000] “GET /index.php HTTP/1.0” 301  
376  
“-” “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;  
SLCC2;  
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center  
PC  
6.0; InfoPath.2; Tablet PC 2.0)”

There isn’t nothing in apache or nginx error logs.

I double-checked the index.php file and is in the correct path /var/www/

---

<div class="post-metadata">

**Author:** ![Victor\_Fondevilla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@Victor\_Fondevilla](https://www.ruby-forum.com/u/Victor_Fondevilla)\
**Post date:** [April 13, 2010, 9:30pm UTC](https://www.ruby-forum.com/t/re-nginx-problem-with-reverse-proxying/186660/4 "2010-04-13T21:30:20Z")

</div>

Finally I reinstalled everything and it worked flawlessly.

---

<div class="post-metadata">

**Author:** ![Victor\_Fondevilla](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/e9a140/32.png) [@Victor\_Fondevilla](https://www.ruby-forum.com/u/Victor_Fondevilla)\
**Post date:** [April 11, 2010, 4:46pm UTC](https://www.ruby-forum.com/t/re-nginx-problem-with-reverse-proxying/186660/5 "2010-04-11T16:46:43Z")

</div>

Hello!

On Sun, Apr 11, 2010 at 03:15:22PM +0200, Victor Fondevilla wrote:

> 127.0.0.1 - - [11/Apr/2010:12:41:51 +0000] “GET /index.php HTTP/1.0” 301 376  
> “-” “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2;  
> .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC  
> 6.0; InfoPath.2; Tablet PC 2.0)”

So it’s obviously Apache which retruned 301. You have to dig into  
your Apache configuration and/or your php code to find out what’s  
happening.

> There isn’t nothing in apache or nginx error logs.
> 
> I double-checked the index.php file and is in the correct path /var/www/

Hint: start from checking if it’s in fact called, most likely it’s  
not. Either due to rewrites you configured in Apache config  
and/or .htaccess, or due to some other Apache configuration  
options.

Maxim D.
