I am using Mongrel Cluster with Apache 2.2.3 + mod_proxy_balancer and
would like to enable compression (assuming it improves throughtput)
and limit file size upload. I configured mod_deflate and
LimitRequestSize in Apache, but in my trials looks like the proxied
calls bypass those directives (the conf goes below).
Is there a way to get this?
-- fxn
NameVirtualHost *:80
# Configure the balancer to dispatch to the Mongrel cluster.
<Proxy balancer://example_cluster>
BalancerMember http://127.0.0.1:3001
BalancerMember http://127.0.0.1:3002
BalancerMember http://127.0.0.1:3003
</Proxy>
# Setup the VirtualHost for your Rails application
<VirtualHost *:80>
ServerAdmin admin at example.com
ServerName www.example.com
ServerAlias localhost
LimitRequestSize 102400
DocumentRoot /path/to/example/public
<Directory ''/path/to/example/public''>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ProxyPass / balancer://example_cluster/
ProxyPassReverse / balancer://example_cluster/
# Setup your Rewrite rules here
RewriteEngine On
# Rewrite index to check for static
RewriteRule ^/$ /index.html [QSA]
# Send all requests that are not found as existing files to the
cluster
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://example_cluster%{REQUEST_URI}
[P,QSA,L]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/
css application/x-javascript
# Error logs
ErrorLog /path/to/example/log/apache_error_log
CustomLog /path/to/example/log/apache_access_log combined
</VirtualHost>