Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I configured Apache with a CacheRoot directory for each of my domains / virtual hosts:

<VirtualHost>
ServerName domain1.tld
...
CacheRoot /var/www/vhosts/domain1.tld/httpdocs/cache
...
</VirtualHost>

<VirtualHost>
ServerName domain2.tld
...
CacheRoot /var/www/vhosts/domain2.tld/httpdocs/cache
...
</VirtualHost>

I have this up and running for quite a while and so fare it's working pretty well except that I have to empty out the cache manually every so often because htcacheclean does't know of the different directories.

Now I would like to setup htcacheclean to watch over the cache directories but as fare as I understand the manual, I can only set it to one cache directory. I would like to do something like this but that doesn't work:

<VirtualHost>
ServerName domain1.tld
...
CacheRoot /var/www/vhosts/domain1.tld/httpdocs/cache
    htcacheclean -n -t -p/var/www/vhosts/domain1.tld/httpdocs/cache -l1024M
...
</VirtualHost>

Is it even right to have multiple cache directorys or should I work with just one cache directory for all of the domains?

share|improve this question

1 Answer 1

htcacheclean is not an apache directive (-: so it can't go in your conf files. You have to run it "manually or in daemon mode", per the documentation. HTH.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.