Apache VirtualHost , Mongrel Cluster for rimu's hosting services

Here is the file that worked for me (for Apache 2.0)

NameVirtualHost *:80

ServerName myapp.com
ServerAlias www.myapp.com

DocumentRoot /var/www/yycctw/public


Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000
ProxyPreserveHost on
ProxyPass /images !
ProxyPass /stylesheets !
ProxyPass /excerpt !
ProxyPass /javascripts !
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined



I found the one for apache 2.2 at lots of places but nothing for Apache 2.0 so I decided to write one on my own. Note that the last few lines with ! at the end are for allowing apache instead of mongrel to server images/stylesheets/excerpt/javascript because of it efficiency. Also here are my mongrel configuraiton:

---
cwd: /u/apps/yycctw/current
port: "8000"
environment: production
address: 127.0.0.1
pid_file: log/mongrel.pid
servers: 1


Note that mongrel runs on 127..0.0.1 and not myapp.com.



keywords: Apache, Rails, Rimuhosting, Rimu, Virtualhost, Mongrel

Comments

Popular posts from this blog

Impossible