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
</Directory>
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
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f
RewriteRule (.*) $1 [L]
# Don't do forward proxying
ProxyRequests Off
# Enable reverse proxying
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Pass other requests to mongrel instance
ProxyPass / http://127.0.0.1:8200/
ProxyPassReverse / http://127.0.0.1:8200/
</VirtualHost>
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 :)
Thanks,
Martins
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users