Question

We have this situation: - Apache running mod_perl - Multiple virtual hosts with own directories - Each virtual module has the same name for perl modules (development hosts, module differ a little bit, but have the same names) - Apache2::Reload for each virtual host to reload module on change

But apache throws 500 error on every 1/3 requests for the page reload and without specific error in the log, only warnings about "redefined functions".

Maybe there are some requirements to run the same module names but different paths and distinct them?

Was it helpful?

Solution

Here is how its done:

NameVirtualHost 192.168.0.140

<VirtualHost 192.168.0.140>
     PerlOptions +Parent
     PerlSwitches -Mlib=/path/to/application
     DocumentRoot /path/to/application
     ServerName name.domain.com
</VirtualHost>

OTHER TIPS

No, you cannot "run the same module name but with different paths". Perl just does not work that way. If you want to have multiple environments, keep them separate. You can run many Apache instances with different configurations (see the -f *configfilename* option) on various ports. Then in each vhost in the main server, reverse proxy to the back-end server on the corresponding port.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top