# Deploying on windows 2000 server

**URL:** <https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246>\
**Category:** Deployment\
**Created:** [May 3, 2007, 11:03am UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246 "2007-05-03T11:03:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 11:03am UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/1 "2007-05-03T11:03:28Z")

</div>

I’m not a windows user, and I’ve never deployed on windows. Made this  
small app for a company, and they want it deployed on one of their own  
servers - a windows server.

I’ve installed this Rails Prod Win package. When browsing to  
[http://localhost](http://localhost),  
I get the 500 error page from the .htaccess. This is what the apache  
error log says: [Parked at Loopia](http://pastie.caboo.se/58525)

After googling around for a while, I found this small fcgi script to  
test if fcgi is working - [Parked at Loopia](http://pastie.caboo.se/58526) - and it is.  
Browsing to that file displays the stuff, and does the incremental  
count on each request.

No clue at all about this pipe 1 stuff in the error messages. Anyone  
has a clue at all? I have absolutely no idea where to start, so _any_  
help on this will be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/2 "2007-05-03T16:16:42Z")

</div>

Unless you have to, as in you have a gun to your head or I suppose  
an unreasonable client, I would recommend NOT deploying Rails via FCGI  
on Windows. We tried for a while and were never happy with either the  
ongoing management or reliability. I recommend the basic Rails  
deployment profile: Apache, mod\_proxy\_balancer, and Mongrel. Easy to  
setup and very reliable. There are a number of resources out there on  
how to set this up.

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/3 "2007-05-03T16:39:45Z")

</div>

+1.  
Mongrel can install as a service on Windows. There is no clustering  
support  
for Mongrel on Windows (though I hear it’s coming…) and so you just  
install mongrel as a service once for each port. You can then use the  
mod\_proxy\_balance approach in Apache 2.2.

I’ll be talking about deployment on Windows at RailsConf apparently, so  
come  
see me if you’re going 🙂

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/4 "2007-05-03T17:11:52Z")

</div>

I’ll be attending your session, Brian, but primarily just to heckle  
and correct you. I should be easy to spot as I’ll be the incredibly  
intelligent guy that impressed you so much.  
Or… uh… something like that. Thanks for your original  
documentation on deploying Rails on Windows, it was VERY helpful!

As for the lack of Mongrel ‘clustering’ support… I wish the name  
would change as ‘cluster’ is far too overloaded a term, I prefer  
‘packs’. It’s simply an issue of process management so a few batch  
files will do the trick. I have four batch files for the  
installation, removal, starting, and stopping of a Mongrel pack.  
Their contents are as follows:

# 

# mongrel\_install.bat

# 

@echo off  
call mongrel\_rails service::install -N -9000 -c -  
p 9000 -e production  
call mongrel\_rails service::install -N -9001 -c -  
p 9001 -e production  
…  
call mongrel\_rails service::install -N -9016 -c -  
p 9016 -e production

sc config -9000 start= auto  
sc config -9001 start= auto  
…  
sc config -9016 start= auto

# 

# mongrel\_remove.bat

# 

@echo off  
call mongrel\_rails service::remove -N -9000  
call mongrel\_rails service::remove -N -9001  
…  
call mongrel\_rails service::remove -N -9016

# 

# mongrel\_start.bat

# 

@echo off  
net start -9000  
net start -9001  
…  
net start -9016

# 

# mongrel\_stop.bat

# 

@echo off  
net stop -9000  
net stop -9001  
…  
net stop -9016

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 6:32pm UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/5 "2007-05-03T18:32:04Z")

</div>

For some reason, using mongrel didn’t even cross my mind. Trying that  
now. Managed to get mongler running on localhost:4000, all I need to  
figure out now is how to proxy it properly =) At the moment I’m  
getting 403 forbidden when doing ProxyPass / [http://localhost:4000](http://localhost:4000),  
not sure why that is. Going localhost/images/rails.png is working, so  
I guess I did something right.

Thanks!

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 5:49pm UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/6 "2007-05-03T17:49:58Z")

</div>

Pretty much what I use, almost exactly. Would love to update my  
original  
documentation, but there’s this book that’s supposed to be coming out  
that  
contains the updates.

I was just asked to present 2 days ago so please, no heckling. I’m  
nervous  
enough as it is.

🙂

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 6:34pm UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/7 "2007-05-03T18:34:04Z")

</div>

Just in case someone is very bored today: [Parked at Loopia](http://pastie.caboo.se/58616)

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [May 3, 2007, 7:36pm UTC](https://www.ruby-forum.com/t/deploying-on-windows-2000-server/103246/8 "2007-05-03T19:36:37Z")

</div>

This one is now working:

\<Proxy balancer://testapp\>  
BalancerMember [http://localhost:4000](http://localhost:4000)

\<VirtualHost \*:80\>  
ServerAdmin removed\_email\_address@domain.invalid  
ServerName localhost  
ServerAlias localhost  
ProxyPass / balancer://testapp/  
ProxyPassReverse / balancer://testapp/

Perhaps the previous one would work too. I got the same message first  
time I tried the above, but after actually checking the apache error  
logs (grats, me), it mentioned that mod\_proxy needed some sub-modules  
to be loaded. So i uncommented all the LoadModule proxy\_\* modules.

Again, thanks a lot!
