in reply to Developement and production mod_perl sites on a single server

Run two mod_perl servers. One for production and another for development. There is no other way with Apache 1.3.xx and mod_perl 1.xx. Perl interpretator is shared among all vhosts so you cannot separate production versions of modules from development.

I heard that Apache 2.xx and mod_perl 2.xx will allow to run different Perl interpretators for different vhosts but it is not production-ready yet.

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org

  • Comment on Re: Developement and production mod_perl sites on a single server

Replies are listed 'Best First'.
Re: Re: Developement and production mod_perl sites on a single server
by Anonymous Monk on Nov 12, 2002 at 00:34 UTC
    Doesn't that leave you with whatever modules are in the lib path being used by both processes? How do you maintain a seperate set of modules across the two server instances?

    How do you migrate from one set to the other?

      Doesn't that leave you with whatever modules are in the lib path being used by both processes? How do you maintain a seperate set of modules across the two server instances?

      Each mod_perl server can use its own lib path. There are many ways to modify default @INC: for example you can set PERL5LIB environment variable in Apache startup script (see perlrun for description of PERL5LIB) or just use lib in server startup script.

      How do you migrate from one set to the other?

      Simpliest solution: cp -rv /home/testing /home/production what requires you to store all information that varies in production and development environments like filepaths and database name in separate config files.

      Actually it may be much more complex (say, you want to use CVS). This is the question of deployment strategy which was recently covered by this thread in mod_perl maillist.

      --
      Ilya Martynov, ilya@iponweb.net
      CTO IPonWEB (UK) Ltd
      Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
      Personal website - http://martynov.org

Re: Development and production mod_perl sites on a single server
by geewiz (Novice) on Nov 13, 2002 at 14:21 UTC

    Run two mod_perl servers.

    Depending on the project size, you should even consider running completely seperate servers for development, QA and production. Since we don't like to shell out the money for a dozen physically separate servers, we use multiple virtual servers on one box with VMware (UserModeLinux will be tested soon).

    This can also be applied to the "virtual mod_perl hosting" problem.

    Best regards,
      Jochen "geewiz" Lillich

Re: Re: Developement and production mod_perl sites on a single server
by bits (Sexton) on Nov 12, 2002 at 00:37 UTC
    That last post was mine -- logging in helps ... :)