Re: [Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP??

2006-08-31 Thread Jean Verger
Hi, (this mail was sent yesterday with a weird subject that I can't locate anymore)regarding running PHP+Ruby: the php app/files are under
the same folder where the rubby applications are. So therefore, I
guess, they are also under the same virtual host.I have tried and it is true that if they are running under a different virtual host there is no problem. 
I guess the php code is being send to the mongrels ... wich
don't expect php code (but rather ruby) and give it back as plain text
... wich ends up being what I see in the browser. Could I define the
same virtual host twice? once with proxy (straight to the mongres
dealing with ruby) and other one without the proxy ... to let Apache
take care of PHP?
Hi Philip,thanks for your reply ... your PHP files are
under the same folder as the Ruby code? I'll research on what is
RewriteCond and RewriteRule ... I was trying to work something out with
the FilterFiles (or something like that ...)
thanks,JeanOn 8/30/06, Jean Verger [EMAIL PROTECTED]
 wrote:Hi,I just realice that I can't run php code anymore once I installed my dear mongrels (under an Apache Proxy Balancer).
I'm just trying to run the clasic phpinfo() in the following file /var/rubyapp/public/phpinfo.php ... but instead of being executed the code is being displayed as plain text ... This is the ouput :)) 
 ?PHP phpinfo(); ?anyone can give a hint please on how to have Ruby and PHP code under Apache Proxy Balancer?thanks a lot ,Juan


___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

[Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP??

2006-08-30 Thread Jean Verger
Hi,I just realice that I can't run php code anymore once I installed my dear mongrels (under an Apache Proxy Balancer).I'm just trying to run the clasic phpinfo() in the following file /var/rubyapp/public/phpinfo.php ... but instead of being executed the code is being displayed as plain text ... This is the ouput :)) 
 ?PHP phpinfo(); ?anyone can give a hint please on how to have Ruby and PHP code under Apache Proxy Balancer?thanks a lot ,Juan
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Re: [Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP??

2006-08-30 Thread James Ludlow
On 8/30/06, Jean Verger [EMAIL PROTECTED] wrote:
 Hi,
 I just realice that I can't run php code anymore once I installed my dear
 mongrels (under an Apache Proxy Balancer).

 I'm just trying to run the clasic phpinfo() in the following file
 /var/rubyapp/public/phpinfo.php ... but instead of being executed the code
 is being displayed as plain text ... This is the ouput :))

 ?PHP phpinfo(); ?

 anyone can give a hint please on how to have Ruby and PHP code under  Apache
  Proxy  Balancer?


Is your Rails app on a different virtual host than your PHP app?  If
it is, this shouldn't be a problem.

Can you post the relevant config files?

-- James
___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users


Re: [Mongrel] Ruby+Apache2.2+ProxyLoadBalance ...... +PHP??

2006-08-30 Thread Philip Hallstrom
 Hi,
 I just realice that I can't run php code anymore once I installed my dear
 mongrels (under an Apache Proxy Balancer).

 I'm just trying to run the clasic phpinfo() in the following file
 /var/rubyapp/public/phpinfo.php ... but instead of being executed the code
 is being displayed as plain text ... This is the ouput :))

   ?PHP phpinfo(); ?

 anyone can give a hint please on how to have Ruby and PHP code under
 Apache  Proxy  Balancer?

My httpd.conf looks like this (excluding the parts that bring in standard 
PHP stuff).  Works fine for us.  The only thing that doesn't work are URLs 
like: http://foo/path/to/phpscript.php/path/info/here.

   Proxy balancer://mongrel_cluster
 BalancerMember http://127.0.0.1:8805
   /Proxy

   RewriteEngine On

   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d
   RewriteRule ^(.+[^/])$ $1/ [R]

   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} \.php
   RewriteRule ^(.*)$ $1 [QSA,L]

   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.html -f
   RewriteRule ^(.*)$ $1/index.html [QSA,L]

   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME}/index.php -f
   RewriteRule ^(.*)$ $1/index.php [QSA,L]

   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} -d
   RewriteRule ^(.*)[^/]$ $1/ [QSA,L]

   RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
   RewriteRule ^/(.*)$ balancer://mongrel_cluster%{REQUEST_URI} [P,QSA,L]

___
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users