[Mongrel] Expert feedback needed

13 one.three at gmail.com
Tue Sep 26 15:03:40 EDT 2006

Hello list,

Some time ago I was looking for apache (as non balanced proxy)  +
mongrel configurations. Almost everybody seemed to use similar
approaches (one of these could be found @ mongrel.rubygorge.org docs)
with mod_rewrite. I don't use proxy_balancer because I don't need it
at the moment (my site has pretty low traffic). This is apache
configuration that I'm using at the moment. It's tested as Zed
suggested (mr start -e production -B) and it looks like all static
files are served by apache and dynamic ones be mongrel. Here is my
apache config:

<VirtualHost *>
	ServerName myapp.tld
	ServerAlias www.myapp.tld
	DocumentRoot /var/www/sites/myapp/current/public

	<Directory "/var/www/sites/myapp/current/public">
		Options FollowSymLinks
		AllowOverride None
		Order allow,deny
		Allow from all

	RewriteEngine On

	# Check for maintenance file. Let apache load it if it exists
	RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
	RewriteRule . /system/maintenance.html [L]
	# Let apache serve static files
	RewriteRule (.*) $1 [L]
	# Don't do forward proxying
	ProxyRequests Off
	# Enable reverse proxying
	<Proxy *>
		Order deny,allow
		Allow from all
	# Pass other requests to mongrel instance
	ProxyPass /
	ProxyPassReverse /

It would be great if some expert could take a look at my config and
point me at my mistakes etc ! I am asking this because it looks like
it just works, and it makes me think that it can't be so easy :)


More information about the Mongrel-users mailing list