httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Izan <erlg...@yahoo.es>
Subject [users@httpd] mod_cache per virtualhost in a proxy apache
Date Wed, 05 Oct 2011 09:45:40 GMT
Hi.
I am trying to enable mod_cache in one apache in ubuntu-server (2.2.14) that acts like a proxy
for another apaches.
My first question is:
¿Is mod_mem_cache indicated for a proxy of apaches or it should be mod_disk_cache?

Finally I enabled mod_mem_cache as the doc seems to say:

- Simple I edit /etc/apache2/mods-available/mem_cache.conf  with:

<IfModule mod_mem_cache.c>
        CacheEnable mem /
        MCacheSize 4096
        MCacheMaxObjectCount 100
        MCacheMinObjectSize 1
        MCacheMaxObjectSize 2048
</IfModule>

and enable modules and restart apache:
# a2enmod cache
# a2enmod mem_cache
# /etc/init.d/apache2 restart

My second question is:
It is so easy like this to configure mem_cache in a "apache that act as proxy for another
apaches" (only editing the mem_cache.conf file) for manage all the another apaches that are
managed by this proxy-apache?...or I must set one configuration like this, per proxy defined
like virtualhost in /etc/apache2/sites-available dir?

For example, in /etc/apache2/sites-available/webserver1:


<VirtualHost *:80>
             ProxyPreserveHost On
             ProxyPass / http://192.168.X.XX/
             ProxyPassReverse / http://192.168.X.XX/
             ServerName blabla.com
</VirtualHost>

<IfModule mod_mem_cache.c>
        CacheEnable mem /
        MCacheSize 4096
        MCacheMaxObjectCount 100
        MCacheMinObjectSize 1
        MCacheMaxObjectSize 2048
</IfModule>

- in /etc/apache2/sites-available/webserver2:

<VirtualHost *:80>
             ProxyPreserveHost On
             ProxyPass / http://192.168.X.XX/
             ProxyPassReverse / http://192.168.X.XX/
             ServerName blabla.com
</VirtualHost>

<IfModule mod_mem_cache.c>
        CacheEnable mem /
        MCacheSize 4096
        MCacheMaxObjectCount 100
        MCacheMinObjectSize 1
        MCacheMaxObjectSize 2048
</IfModule>

etc, etc.

Or it is enough with sepecify it in the /etc/apache2/mods-available/mem_cache.conf for all
the proxy apaches to star being cahed by my 'proxy-apache'

Thank you 

Gonzalo

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message