Ano-Tech Computers
Enter keyword:

CentOS 5.2: HTML::Mason leaks data between virtualhosts
Problem:
After moving all our existing web virtualhosts from SuSE 10.1 to CentOS 5.2 all the virtualhosts would suffer from "leaks" between the different virtualhosts. Troubleshooting the issue, we discovered that HTML::Mason was using a single object cache for all virtualhosts, i.e. causing only one index.html object to be used for all the sites.
 
Solution:
On the old SuSE server, we used one global
PerlSetVar MasonDataDir /cache/path
plus one
PerlSetVar MasonDataDir /cache/path/vhost
per virtualhost.

On the CentOS 5.2 host we simply had to remove the global setting. This caused the virtualhost settings to become effective again, solving the main problem.

However it also meant that for any request not matching any of the virtualhosts, Apache would try to cache contents in /var/www/mason. We simply created this directory and made it writable by the apache user. /var/www/html only contains a stub index.html with a meta refresh to our official URL so the cache won't ever grow in size.

 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles