Skrevet av Emne: CentOS 5.2: HTML::Mason leaks data between virtualhosts  (Lest 5750 ganger)

ATC

  • Gjest
CentOS 5.2: HTML::Mason leaks data between virtualhosts
« på: 25. Mars 2009, 21:38 pm »
  • [applaud]0
  • [smite]0
  • 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.



    ATC

    • Gjest
    [Solved] CentOS 5.2: HTML::Mason leaks data between virtualhosts
    « Svar #1 på: 25. Mars 2009, 21:38 pm »
  • [applaud]0
  • [smite]0
  • 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.