RE: [Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread matthew couchman (JIC)
Thanks for all the replies, much appreciated.

From: Andrew Rodland [mailto:and...@cleverdomain.org]
Sent: 29 July 2011 15:25
To: The elegant MVC web framework
Subject: Re: [Catalyst] Configuring Apache for mod_perl Catalyst and php via 
mod_proxy

Another solution, less ugly (IMO) than mod_proxy, is removing mod_php by 
setting up PHP behind mod_fastcgi. In fact, if you remove mod_perl as well by 
putting your Catalyst apps behind mod_fastcgi, you can have all the threading 
you desire.
On Fri, Jul 29, 2011 at 8:15 AM, Tomas Doran 
mailto:bobtf...@bobtfish.net>> wrote:

On 29 Jul 2011, at 12:25, matthew couchman (JIC) wrote:
Thanks for your reply. Perhaps it was too sweeping a statement but I can only 
say that for my setup mod_perl works fine through Apache alone as does php but 
when I combine them it crashes with memory corruption errors.

(At a guess), don't use the threaded MPM.

Use prefork and everything will be fine.


Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk<mailto:Catalyst@lists.scsys.co.uk>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

-
Please note, that my email address is no longer givenname.surn...@bbsrc.ac.uk.  
Please update your records to reflect my new email address of 
givenname.surn...@jic.ac.uk as shown on this email.___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread Andrew Rodland
Another solution, less ugly (IMO) than mod_proxy, is removing mod_php by
setting up PHP behind mod_fastcgi. In fact, if you remove mod_perl as well
by putting your Catalyst apps behind mod_fastcgi, you can have all the
threading you desire.

On Fri, Jul 29, 2011 at 8:15 AM, Tomas Doran  wrote:

>
> On 29 Jul 2011, at 12:25, matthew couchman (JIC) wrote:
>
>  Thanks for your reply. Perhaps it was too sweeping a statement but I can
>> only say that for my setup mod_perl works fine through Apache alone as does
>> php but when I combine them it crashes with memory corruption errors.
>>
>
> (At a guess), don't use the threaded MPM.
>
> Use prefork and everything will be fine.
>
>
> Cheers
> t0m
>
>
> __**_
> List: Catalyst@lists.scsys.co.uk
> Listinfo: 
> http://lists.scsys.co.uk/cgi-**bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/**
> catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread Larry Leszczynski
Hi Matthew -

On Fri, 29 Jul 2011 12:25 +0100, "matthew couchman (JIC)"
 wrote:
> Thanks for your reply. Perhaps it was too sweeping a statement but I can
> only say that for my setup mod_perl works fine through Apache alone as
> does php but when I combine them it crashes with memory corruption
> errors.

Usually that means that your mod_perl and mod_php have been linked
against conflicting versions of the same system library or built with
conflicting compile options.  Make sure you have built them using the
same environment and config options.  You'll probably find more useful
info on the mod_perl mailing list than this list:

   http://perl.apache.org/maillist/modperl.html

On that page there are also links to searchable archives of the mod_perl
list, might find some info about your problem in there.


HTH,
Larry

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread Tomas Doran


On 29 Jul 2011, at 12:25, matthew couchman (JIC) wrote:

Thanks for your reply. Perhaps it was too sweeping a statement but I  
can only say that for my setup mod_perl works fine through Apache  
alone as does php but when I combine them it crashes with memory  
corruption errors.


(At a guess), don't use the threaded MPM.

Use prefork and everything will be fine.

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread matthew couchman (JIC)
Thanks for your reply. Perhaps it was too sweeping a statement but I can only 
say that for my setup mod_perl works fine through Apache alone as does php but 
when I combine them it crashes with memory corruption errors. 

> -Original Message-
> From: Tomas Doran [mailto:bobtf...@bobtfish.net]
> Sent: 29 July 2011 12:10
> To: The elegant MVC web framework
> Subject: Re: [Catalyst] Configuring Apache for mod_perl Catalyst and
> php via mod_proxy
> 
> 
> On 29 Jul 2011, at 12:03, matthew couchman (JIC) wrote:
> 
> > Hi,
> >
> > I'm currently running a couple of Catalyst applications configured
> > as VirtualHosts in Apache. I have some php software that I'd like to
> > serve from the same server but I've discovered that php and mod_perl
> > don't seem to get along in the same Apache instance.
> >
> 
> Erm, yes they do?
> 
> Cheers
> t0m
> 
> 
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-
> archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
-
Please note, that my email address is no longer givenname.surn...@bbsrc.ac.uk.  
Please update your records to reflect my new email address of 
givenname.surn...@jic.ac.uk as shown on this email.
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread Tomas Doran


On 29 Jul 2011, at 12:03, matthew couchman (JIC) wrote:
Which, if I am only running one host on the mod_perl server, works  
perfectly well. I’d like to tweak it further to redirect to the  
various VirtualHosts that I have been running with mod_perl alone  
but I’m not familiar enough with Apache to know how. Could anyone  
offer advice?




Doesn't need any extra config.

The request is passed through by the proxy as-is, and therefore the  
only thing affecting which app gets it on the backend server is the  
vhost config on that backend server.


Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread Tomas Doran


On 29 Jul 2011, at 12:03, matthew couchman (JIC) wrote:


Hi,

I’m currently running a couple of Catalyst applications configured  
as VirtualHosts in Apache. I have some php software that I’d like to  
serve from the same server but I’ve discovered that php and mod_perl  
don’t seem to get along in the same Apache instance.




Erm, yes they do?

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Configuring Apache for mod_perl Catalyst and php via mod_proxy

2011-07-29 Thread matthew couchman (JIC)
Hi,

I'm currently running a couple of Catalyst applications configured as 
VirtualHosts in Apache. I have some php software that I'd like to serve from 
the same server but I've discovered that php and mod_perl don't seem to get 
along in the same Apache instance.

Mod_proxy looks like a good solution and I've made some progress by following 
http://wiki.apache.org/httpd/RunningMultipleApacheInstances. That page suggests 
that the proxy httpd might be configured something like this:

# httpd-proxy.conf
NameVirtualHost *:80

  DocumentRoot /www/wordpress
  ServerName blog.company.com
  ProxyPass / http://localhost:81/
  ProxyPassReverse / http://localhost:81/
  [... additional directives here ... ]


  DocumentRoot /www/svn
  ServerName svn.company.com
  ProxyPass / http://localhost:82/
  ProxyPassReverse / http://localhost:82/
  [... additional directives here ... ]


And the mod_perl httpd as:


# httpd-perl.conf

 Listen 81

 ErrorLog /var/log/httpd-perl-error.log

 LoadModule perl_module libexec/apache22/mod_perl.so

Which, if I am only running one host on the mod_perl server, works perfectly 
well. I'd like to tweak it further to redirect to the various VirtualHosts that 
I have been running with mod_perl alone but I'm not familiar enough with Apache 
to know how. Could anyone offer advice?

Thanks very much,

Matt.

-
Please note, that my email address is no longer givenname.surn...@bbsrc.ac.uk.  
Please update your records to reflect my new email address of 
givenname.surn...@jic.ac.uk as shown on this email.___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/