You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Octavian Rasnita <or...@gmail.com> on 2007/01/12 17:52:00 UTC

installing mod_perl for 2 servers

Hi all,

I have installed a proxy/reverse proxy server and on the same computer I 
want to install other 2 Apache servers and use mod_perl on both of them.
(One would be for testing the programs before running them in production.)

Is it possible to install mod_perl on 2 servers on the same computer without 
having 2 separate perl installations?

I have tried installing with the cpan shell, but it told me that the module 
is already installed and up-to-date.

I could get the tarball from cpan.org and compile manually, and it will 
probably ask me for the location of the apxs, and I could specify the Apache 
I want to use, but it will also install some files in the perl directory, 
and I don't want to confuse perl and make it work finally only with one of 
the 2 servers.

Thank you.

Octavian


Re: installing mod_perl for 2 servers

Posted by Octavian Rasnita <or...@gmail.com>.
From: "Jonathan Vanasco" <mo...@2xlp.com>

> No.
>
> Build the server with modules you want, either built-in or shared.
> Some modules that are very common /often used are built-in -- there's  a 
> chance that modules you want and didn't build as shared modules are 
> already compiled into apache.
>
> As per Michael's instructions, if you build mod_so, you can build any 
> module in the future as-needed, and load it as a shared object.
>
> The point being:
> you should have no reason to rebuild apache.  either the modules you  want 
> are built in already , or you can just build the modules and not  the 
> apache web server.

Aha, I'm glad it is possible, but this is what I don't know. How to build 
the modules if Apache is already installed, if they are not built in, and 
not installed as shared?
I have read the description pages for some Apache modules on Apache's site, 
but I didn't found details about installing them if the server is already 
installed.

So I think that if I will need to install some new modules, I might need to 
re-build Apache entirely with all all the modules that I need, including the 
old ones. This would not be very nice, but... is it true?

Or there is a way of just building and adding the new modules I need, just 
like I do with mod_perl for example?

Thanks.

Octavian 


Re: installing mod_perl for 2 servers

Posted by Jonathan Vanasco <mo...@2xlp.com>.
On Jan 12, 2007, at 1:58 PM, Octavian Rasnita wrote:

> Ok, thank you.
>
> I understand now that I will probably need to build the web server  
> with all its modules included as shared, and if I will need a  
> certain module, I will be able to add it using just httpd.conf.
> Until now I've tried to build it with as few as possible modules,  
> and add more modules only if I will need them, but I don't think it  
> is possible, or it is possible but not very easy.


No.

Build the server with modules you want, either built-in or shared.
Some modules that are very common /often used are built-in -- there's  
a chance that modules you want and didn't build as shared modules are  
already compiled into apache.

As per Michael's instructions, if you build mod_so, you can build any  
module in the future as-needed, and load it as a shared object.

The point being:
	you should have no reason to rebuild apache.  either the modules you  
want are built in already , or you can just build the modules and not  
the apache web server.


// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -



Re: installing mod_perl for 2 servers

Posted by Octavian Rasnita <or...@gmail.com>.
Ok, thank you.

I understand now that I will probably need to build the web server with all 
its modules included as shared, and if I will need a certain module, I will 
be able to add it using just httpd.conf.
Until now I've tried to build it with as few as possible modules, and add 
more modules only if I will need them, but I don't think it is possible, or 
it is possible but not very easy.

Octavian

----- Original Message ----- 
From: "Jonathan Vanasco" <jv...@2xlp.com>
To: "Octavian Rasnita" <or...@gmail.com>
Cc: "Michael Peters" <mp...@plusthree.com>; <mo...@perl.apache.org>
Sent: Friday, January 12, 2007 8:17 PM
Subject: Re: installing mod_perl for 2 servers


>
> On Jan 12, 2007, at 12:21 PM, Octavian Rasnita wrote:
>
>> I know that, but the .so modules are not in the modules/ directory,  and 
>> I need to compile them, but I don't know how.
>
> make args on the build - you can specify what modules you want or  don't , 
> and if they're a .so or build in
>
>> For example, if I didn't specified it when I've installed the  server, 
>> the module mod_rewrite is not installed, and it cannot be  found in the 
>> modules/ directory, so I cannot just LoadModule ...
>
> a lot of modules are built-in by default.  they don't appear in the 
> modules directory- they're in the http binary  i think mod_rewrite  falls 
> in that category.
>
> httpd -V
> show compile settings
>
> httpd -l
> list compiled in modules
>
> also, you can use -D arguments to apachectl that are passed into your 
> httpd.conf file via the IfDefine functionality , and have httpd.conf 
> files to act differently.
>
> // Jonathan Vanasco
>
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  - - 
>  - - - - - - - - - - - - - -
> | FindMeOn.com - The cure for Multiple Web Personality Disorder
> | Web Identity Management and 3D Social Networking
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  - - 
>  - - - - - - - - - - - - - -
> | RoadSound.com - Tools For Bands, Stuff For Fans
> | Collaborative Online Management And Syndication Tools
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  - - 
>  - - - - - - - - - - - - - -
>
> 


Re: installing mod_perl for 2 servers

Posted by Jonathan Vanasco <jv...@2xlp.com>.
On Jan 12, 2007, at 12:21 PM, Octavian Rasnita wrote:

> I know that, but the .so modules are not in the modules/ directory,  
> and I need to compile them, but I don't know how.

make args on the build - you can specify what modules you want or  
don't , and if they're a .so or build in

> For example, if I didn't specified it when I've installed the  
> server, the module mod_rewrite is not installed, and it cannot be  
> found in the modules/ directory, so I cannot just LoadModule ...

a lot of modules are built-in by default.  they don't appear in the  
modules directory- they're in the http binary  i think mod_rewrite  
falls in that category.

httpd -V
	show compile settings

httpd -l
	list compiled in modules

also, you can use -D arguments to apachectl that are passed into your  
httpd.conf file via the IfDefine functionality , and have httpd.conf  
files to act differently.

// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -



Re: installing mod_perl for 2 servers

Posted by Octavian Rasnita <or...@gmail.com>.
From: "Michael Peters" <mp...@plusthree.com>

>> But how can I install the other Apache modules that can be installed by
>> adding --enable when using ./config if the server is already installed?
>
> As long as you install mod_so the rest can be added dynamically (via 
> httpd.conf)
> and don't need to be specified at build time.

I know that, but the .so modules are not in the modules/ directory, and I 
need to compile them, but I don't know how.

For example, if I didn't specified it when I've installed the server, the 
module mod_rewrite is not installed, and it cannot be found in the modules/ 
directory, so I cannot just LoadModule ...

Thank you.

Octavian 


Re: installing mod_perl for 2 servers

Posted by Michael Peters <mp...@plusthree.com>.

Octavian Rasnita wrote:

> But how can I install the other Apache modules that can be installed by
> adding --enable when using ./config if the server is already installed?

As long as you install mod_so the rest can be added dynamically (via httpd.conf)
and don't need to be specified at build time.

-- 
Michael Peters
Developer
Plus Three, LP


Re: installing mod_perl for 2 servers

Posted by Octavian Rasnita <or...@gmail.com>.
From: "Michael Peters" <mp...@plusthree.com>

>> Is it possible to install mod_perl on 2 servers on the same computer
>> without having 2 separate perl installations?
>
> Yes. Just use 2 different apache config files and it can use the same
> Apache/mod_perl/Perl code base. No need to install anything else. You can 
> have
> the exact same setup running on multiple instances/ports.

But how can I install the other Apache modules that can be installed by 
adding --enable when using ./config if the server is already installed?

I will need to add mod_proxy, mod_cache, mod_expires and a few others to the 
current installation.

Thank you.

Octavian


Re: installing mod_perl for 2 servers

Posted by Michael Peters <mp...@plusthree.com>.

Octavian Rasnita wrote:
> Hi all,
> 
> I have installed a proxy/reverse proxy server and on the same computer I
> want to install other 2 Apache servers and use mod_perl on both of them.
> (One would be for testing the programs before running them in production.)
> 
> Is it possible to install mod_perl on 2 servers on the same computer
> without having 2 separate perl installations?

Yes. Just use 2 different apache config files and it can use the same
Apache/mod_perl/Perl code base. No need to install anything else. You can have
the exact same setup running on multiple instances/ports.

-- 
Michael Peters
Developer
Plus Three, LP