# Mod_perl and Virtual Hosts



## Pushrod (Dec 17, 2010)

I have a large mod_perl application which is basically a CMS with no backend. I am launching a new site with it, alongside my current site which is already using it.

I haven't tried it yet, but I assume that there will be problems if I configure both hosts to use the same handler, as the handlers are loaded into the Apache process itself.

Is there a way to have a per-host apache process to fully isloate them?
Or do I need to rewrite the application to determine which site it's handling and work with that?
Or am I wrong, a separate instance of the handler will be loaded, despite being the same name and process.


----------



## Alt (Dec 18, 2010)

Afaik, you can put PerlHandler onto virtualhost block, but you cannot set startup script for virtualhosts - they work for server


----------



## Pushrod (Dec 19, 2010)

My application uses a few environment variables, and it appears that there is crosstalk between virtual hosts, even with PerlOptions +Parent configured on both.

I am going to rewrite a few parts of the application and see if I can get two or more copies to coexist.


----------

