top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Disk Cache with multiple virtual hosts

0 votes
433 views

I've read the Apache 2.4 caching guide, mod_cache and mod_cache_disk pages, but am unsure whether I need a unique CacheRoot for each virtual host, or whether multiple virtual hosts can/should share the same CacheRoot?
Also I'm thinking of setting the CacheRoot to be a tmpfs mount (effectively a ramdisk that will page out to swap space if theres not enough ram to cache everything). If I'm using a unique CacheRoot (a sub-directory in the tmpfs mount), is there anyway to configure Apache to create the CacheRoot directory if it doesn't already exist? If anyone has any thoughts / recommendations / tips in this regards to this approach I would be grateful to here them.

posted Jun 18, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Why not mem cache then? Why would you bother with ramdisk if you want to cache in memory?

If Im using a unique CacheRoot (a sub-directory in the tmpfs mount), is there anyway to configure Apache to create the CacheRoot directory if it doesnt already exist? If anyone has any thoughts / recommendations / tips in this regards to this approach I would be grateful to here them.

answer Jun 18, 2013 by anonymous
Can mem_cache be configured to cache way more than you have memory, and swap out to disk for whatever is least popular?
No but how much cache do you need? On the heavy load prod servers we were using 1GB mem cache. Most of the caching is done on the client side anyway.
Similar Questions
0 votes

How to use multiple virtual hosts with a single SSL instance running on the standard https port.

+1 vote

I have 3 virtual hosts that for all I can see are configured identically other the the obviously needed differences. The same is true of the 3 crt files.

 ServerName public.mydomain.com
 DocumentRoot /var/www/html
 SSLEngine on
 SSLCertificateFile /etc/httpd/SSL/public.crt
 SSLCertificateKeyFile /etc/postfix/SSL/server.key

 ServerName distrib.mydomain.com
 DocumentRoot /var/www/html/distrib
 SSLEngine on
 SSLCertificateFile /etc/httpd/SSL/distrib.crt
 SSLCertificateKeyFile /etc/postfix/SSL/server.key

 ServerName mail.mydomain.com
 DocumentRoot /usr/local/squirrelmail/www
 SSLEngine on
 SSLCertificateFile /etc/httpd/SSL/mail.crt
 SSLCertificateKeyFile /etc/postfix/SSL/server.key

The problem is that 2 of them work perfectly and the lock shows up in the browser. With the third (public), I get a gray globe indicating partial encryption which does not prevent eavesdropping. I have no clue
how to debug this or even where to look. Can someone point me in the right direction?

+1 vote

I have two virtual web server and only one IP for the host. So the need of some kind of proxy server.
Whitch one should I use? (apache, nginx, varnish, squid)

I need also the same for smtp (two postfix), if possible the same one :-) basic config?

I have one host , one IP and two domain, one for each virtual machine and the result I want:
abc.org[188.165.211.22]--->abc.org[192.168.50.2]
xyz.org[188.165.211.22]--->xyz.org[192.168.50.3]

0 votes

I am using CentOS 6.0 with Apache 2.2.15, and set up Apache with virtual host. The SSI works fine on the first VH, but ssi on the other virtual hosts does not work. I got the following message in the error log:

mod_include: Options +Includes (or IncludesNoExec) wasnt set, INCLUDES filter removed

Does anyone know how to resolve this problem?

0 votes

Im trying to configure an Ubuntu server with 4 Public IPs to display "This is a shared IP site" if any of the IPs are accessed directly. The server has IP-based virtual-hosts configured on the different IPs. So far, Im not having any success with it.

...