# Proxying

**URL:** <https://www.ruby-forum.com/t/proxying/189594>\
**Category:** NGINX\
**Created:** [June 3, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/proxying/189594 "2010-06-03T18:06:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kleinchris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b2d939/32.png) [@kleinchris](https://www.ruby-forum.com/u/kleinchris)\
**Post date:** [June 3, 2010, 6:06pm UTC](https://www.ruby-forum.com/t/proxying/189594/1 "2010-06-03T18:06:44Z")

</div>

Hello i’ve got just 2 Servers.  
Both are running nginx 0.8.39. Server 1 should be a reverse proxy to  
another Server 2 with nginx and a php backend. but when i set proxy\_pass  
[http://server2/](http://server2/); i can’t open admincp/index.php with the url of server  
1, it brings me error 404…

This is my location of server 1

```auto
location /test/ {
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For 
$proxy_add_x_forwarded_for;
                #proxy_set_header Host $http_host;
                proxy_redirect off;
                proxy_pass http://server2:80;

        }
```

know when I got a php script on server 2 that redirect to  
server2/directory/index.php i get an error 404

Posted at Nginx Forum:

> **[Proxying..](https://forum.nginx.org/read.php?2,94135,94135#msg-94135)**
>
> Hello i've got just 2 Servers. Both are running nginx 0.8.39. Server 1 should be a reverse proxy to another Server 2 with nginx and a php backend. but when i set proxy\_pass http://server2/; i can't open admincp/index.php with the url of server 1, it...

---

<div class="post-metadata">

**Author:** ![kleinchris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b2d939/32.png) [@kleinchris](https://www.ruby-forum.com/u/kleinchris)\
**Post date:** [June 4, 2010, 11:05pm UTC](https://www.ruby-forum.com/t/proxying/189594/2 "2010-06-04T23:05:16Z")

</div>

Can somebody help me?!

I just wan’t to proxy a phpbb to another server. in a colocation. But it  
only proxies the index.php and no other pages, when i click on a link  
like “[domain.org/test/showthread.php?](http://domain.org/test/showthread.php?)…” it gives me a error 404…

Posted at Nginx Forum:

> **[Re: Proxying..](https://forum.nginx.org/read.php?2,94135,94636#msg-94636)**
>
> Hello i've got just 2 Servers. Both are running nginx 0.8.39. Server 1 should be a reverse proxy to another Server 2 with nginx and a php backend. but when i set proxy\_pass http://server2/; i can't open admincp/index.php with the url of server 1, it...

---

<div class="post-metadata">

**Author:** ![kleinchris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b2d939/32.png) [@kleinchris](https://www.ruby-forum.com/u/kleinchris)\
**Post date:** [June 4, 2010, 11:14pm UTC](https://www.ruby-forum.com/t/proxying/189594/3 "2010-06-04T23:14:03Z")

</div>

On Sat, Jun 5, 2010 at 1:04 AM, kleinchris [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Can somebody help me?!
> 
> I just wan’t to proxy a phpbb to another server. in a colocation. But it only proxies the index.php and no other pages, when i click on a link like “[domain.org/test/showthread.php?](http://domain.org/test/showthread.php?)…” it gives me a error 404..

You didn’t give the configuration for server2, so I can’t understand,  
what do you want and what is your problem.  
You can try to replace  
proxy\_pass [http://server2:80](http://server2:80);  
with  
proxy\_pass [http://server2:80/](http://server2:80/);

–  
Boris D..

---

<div class="post-metadata">

**Author:** ![kleinchris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/b2d939/32.png) [@kleinchris](https://www.ruby-forum.com/u/kleinchris)\
**Post date:** [June 5, 2010, 1:24am UTC](https://www.ruby-forum.com/t/proxying/189594/4 "2010-06-05T01:24:02Z")

</div>

[http://nopaste.info/f43f7c82f5.html](http://nopaste.info/f43f7c82f5.html)

This is Configuration of server2. the / don’t work. same error…

Posted at Nginx Forum:

> **[Re: Proxying..](https://forum.nginx.org/read.php?2,94135,94675#msg-94675)**
>
> Hello i've got just 2 Servers. Both are running nginx 0.8.39. Server 1 should be a reverse proxy to another Server 2 with nginx and a php backend. but when i set proxy\_pass http://server2/; i can't open admincp/index.php with the url of server 1, it...
