# Problem in configuring Apache to run as front server

**URL:** <https://www.ruby-forum.com/t/problem-in-configuring-apache-to-run-as-front-server/195085>\
**Category:** Mongrel\
**Created:** [September 16, 2010, 4:30pm UTC](https://www.ruby-forum.com/t/problem-in-configuring-apache-to-run-as-front-server/195085 "2010-09-16T16:30:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit-singh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/9f8e36/32.png) [@amit-singh](https://www.ruby-forum.com/u/amit-singh)\
**Post date:** [September 16, 2010, 4:30pm UTC](https://www.ruby-forum.com/t/problem-in-configuring-apache-to-run-as-front-server/195085/1 "2010-09-16T16:30:58Z")

</div>

Hii all,  
i am ruuning a rails application as windows service like  
first i created an empty service using instsrv.exe and srvany.exe with  
named smruti\_exp ,then i edit in regedit to make this empty service work

This is how running smruti\_exp as service  
[HKEY\_LOCAL\_MACHINE\SYSTEM\CurrentControlSet\Services\smruti\_exp\Parameters]  
Application=ruby  
AppParameters=script\server -b 192.168.247.49 -p 3000  
AppDirectory=D:\work\Smruti1\src

am running mongrel to do all work,but i would like to run apache server  
as front server ,so i made some chnges in http.conf files come with  
Apache

LoadModule rewrite\_module modules/mod\_rewrite.so  
LoadModule proxy\_module modules/mod\_proxy.so  
LoadModule proxy\_balancer\_module modules/mod\_proxy\_balancer.so  
LoadModule proxy\_http\_module modules/mod\_proxy\_http.so

NameVirtualHost \*:80

#Proxy balancer section (create one for each ruby app cluster)  
\<Proxy balancer://src\_cluster\>  
BalancerMember [http://src:3000](http://src:3000)

# BalancerMember [http://myapp:3011](http://myapp:3011)

#Virtual host section (create one for each ruby app you need to publish)  
\<VirtualHost \*:80\>  
ServerName src  
DocumentRoot D:/work/Smruti1/src/public/

\<Directory D:/work/Smruti1/src/public/ \>  
Options Indexes FollowSymLinks MultiViews  
AllowOverride All  
Order allow,deny  
allow from all

#log files  
ErrorLog /var/log/apache2/src\_error.log

# Possible values include: debug, info, notice, warn, error, crit,

# alert, emerg.

LogLevel warn  
CustomLog /var/log/apache2/src\_access.log combined

#Rewrite stuff  
RewriteEngine On

# Check for maintenance file and redirect all requests

RewriteCond %{DOCUMENT\_ROOT}/system/maintenance.html -f  
RewriteCond %{SCRIPT\_FILENAME} !maintenance.html  
RewriteRule ^.\*$ /system/maintenance.html [L]

# Rewrite index to check for static

RewriteRule ^/$ /index.html [QSA]

# Rewrite to check for Rails cached page

RewriteRule ^([^.]+)$ $1.html [QSA]

# Redirect all non-static requests to cluster

RewriteCond %{DOCUMENT\_ROOT}/%{REQUEST\_FILENAME} !-f  
RewriteRule ^/(.\*)$ balancer://src\_cluster%{REQUEST\_URI} [P,QSA,L]

these are the changes i made and in host file  
i added  
192.168.247.49 src

and try to access my application like [http://src](http://src)  
but not working what is the problem
