# Web and Application servers on different machines?

**URL:** <https://www.ruby-forum.com/t/web-and-application-servers-on-different-machines/179664>\
**Category:** Rails\
**Created:** [December 1, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/web-and-application-servers-on-different-machines/179664 "2009-12-01T12:08:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [December 1, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/web-and-application-servers-on-different-machines/179664/1 "2009-12-01T12:08:44Z")

</div>

Hi,

I’m about to setup rails on an XP machine using InstantRails.  
BUT I have to use a separate web server with Apache (separate machine).

So I have to connect the web server and the app server.  
I’ve always had all the stuff on the same machine.

Any good pointers about how the setup is done? (Before I start the  
hacking…)

Thanks.

* * *

I know this should go to the rails deployment, but somehow I feel I  
won’t get any replies there, sorry.

---

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [December 1, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/web-and-application-servers-on-different-machines/179664/2 "2009-12-01T20:17:38Z")

</div>

comopasta Gr wrote:

> I’m about to setup rails on an XP machine using InstantRails.

Yuck. 🙂

> BUT I have to use a separate web server with Apache (separate machine).

Sounds better if that’s a Linux machine. 😉

> So I have to connect the web server and the app server.  
> I’ve always had all the stuff on the same machine.

Any of the load balancing mechanisms you use should be able to handle  
that. One simple way is to use Apache’s mod\_proxy\_balancer, but for more  
robust solutions I hear a lot of people use HAProxy.

[http://httpd.apache.org/docs/2.2/mod/mod\_proxy\_balancer.html](http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html)

> **[HAProxy - The Reliable, High Perf. TCP/HTTP Load Balancer](http://www.haproxy.org/)**
>
> Reliable, High Performance TCP/HTTP Load Balancer

---

<div class="post-metadata">

**Author:** ![comopasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Post date:** [December 2, 2009, 12:08pm UTC](https://www.ruby-forum.com/t/web-and-application-servers-on-different-machines/179664/3 "2009-12-02T12:08:30Z")

</div>

Hi Robert,

Yeah, it will be only for demo purposes, no production. InstantRails is  
just quick to set.

Thanks for the tips, I used the mod\_proxy and got the connection done  
🙂

Cheers.
