3

I have multiple developers on one server, each with their own copy of the same perl codebase checked out of SVN.

I want each developer to have their own subdomain pointing to their own copy of the codebase.

I tried putting PerlSwitches inside , but that didn't seem to work. e.g.


<VirtualHost dev1.devserver.com>
    PerlSwitches -I/home/dev1/www -w -T
    <Location /webapp/>
        SetHandler  perl-script
        PerlHandler WebApp::Handler
    </Location>
</VirtualHost>

<VirtualHost dev2.devserver.com>
    PerlSwitches -I/home/dev2/www -w -T
    <Location /webapp/>
        SetHandler  perl-script
        PerlHandler WebApp::Handler
    </Location>
</VirtualHost>

Thanks.

aidan
  • 615
  • 4
  • 10
  • 23

4 Answers4

2

Although this post is pretty old, I though to point out of few things in case someone comes across it while searching. I'd consider mod_perl a production target (although I'd personally prefer fastcgi) NOT a good development environment for reasons pointed out above. If you are starting a new Perl project you should consider building on top of Plack (http://plackperl.org/) or a modern framework such as Catalyst (http://www.catalystframework.org/) which is designed from the start to be developer friendly.

Good luck!

2

Try adding PerlOptions +Parent above the PerlSwitches directive...Should force it to allocate a new interpreter pool.

Link to mod_perl PerlOptions directive

Satanicpuppy
  • 5,917
  • 1
  • 16
  • 18
0

I don't think it can be done. mod_perl is an integral part of the apache process. You will probably need to setup two separate httpds.

It may be best to separate them for development purposes anyways.

0

You may need separate Apache installs as noted. You could use ip aliases, hostnames to give each dev an ip with an apache answering on default ports, or just bind the apaches to non-standard ports as best suits you.

You may be able to get somewhere using su exec, but I think that only works with CGI mode so it won't help you if you need mod_perl.

adric
  • 531
  • 2
  • 7