|
|
|
|
| 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.
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
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