mod_cache per virtualhost in a proxy apache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux