Welcome! Log In Create A New Profile

Advanced

Apache2 + PHP-FPM

Posted by Dan Fekete 
Dan Fekete
Apache2 + PHP-FPM
February 04, 2010 06:44AM
Hi!
Could please someone point me in the right direction how to configure
PHP-FPM with Apache 2?
Thank you !
Re: Apache2 + PHP-FPM
February 04, 2010 06:58AM
same way you'd configure apache w/ php through fastcgi - using
mod_fastcgi or mod_fcgid or whatever and pointing it to the socket or
ip:port

should be transparent.

On Thu, Feb 4, 2010 at 3:42 AM, Dan Fekete <drdande@gmail.com> wrote:
> Hi!
> Could please someone point me in the right direction how to configure
> PHP-FPM with Apache 2?
> Thank you !
>
Dan Fekete
Re: Apache2 + PHP-FPM
February 05, 2010 04:28AM
Thank you for replies!
I'm trying to configure with libapache2_mod_fastcgi without too much
luck :(((
My config is:

FastCGIExternalServer /fast-cgi-fake-handler -host
127.0.0.1:9000
DocumentRoot /var/www/

<Directory />
Options FollowSymLinks +ExecCGI
AllowOverride None
AddType application/x-httpd-fastphp5 .php
Action application/x-httpd-fastphp5 /fast-cgi-fake-
handler
</Directory>

It just timeouts or connection is reset. Any ideas?
Thank you!!

On Feb 4, 12:56 pm, Michael Shadle <mike...@gmail.com> wrote:
> same way you'd configure apache w/ php through fastcgi - using
> mod_fastcgi or mod_fcgid or whatever and pointing it to the socket or
> ip:port
>
> should be transparent.On Thu, Feb 4, 2010 at 3:42 AM, Dan Fekete <drda...@gmail.com> wrote:
> > Hi!
> > Could please someone point me in the right direction how to configure
> > PHP-FPM with Apache 2?
> > Thank you !
>
>
Re: Apache2 + PHP-FPM
February 05, 2010 07:52AM
use nginx :)

honestly i don't want to take the time to try to figure out apache+fastcgi :(

On Fri, Feb 5, 2010 at 1:26 AM, Dan Fekete <drdande@gmail.com> wrote:
> Thank you for replies!
> I'm trying to configure with libapache2_mod_fastcgi without too much
> luck :(((
> My config is:
>
>        FastCGIExternalServer /fast-cgi-fake-handler -host
> 127.0.0.1:9000
>        DocumentRoot /var/www/
>
>        <Directory />
>                Options FollowSymLinks +ExecCGI
>                AllowOverride None
>                AddType application/x-httpd-fastphp5 .php
>                Action application/x-httpd-fastphp5 /fast-cgi-fake-
> handler
>        </Directory>
>
> It just timeouts or connection is reset. Any ideas?
> Thank you!!
>
> On Feb 4, 12:56 pm, Michael Shadle <mike...@gmail.com> wrote:
>> same way you'd configure apache w/ php through fastcgi - using
>> mod_fastcgi or mod_fcgid or whatever and pointing it to the socket or
>> ip:port
>>
>> should be transparent.On Thu, Feb 4, 2010 at 3:42 AM, Dan Fekete <drda....@gmail.com> wrote:
>> > Hi!
>> > Could please someone point me in the right direction how to configure
>> > PHP-FPM with Apache 2?
>> > Thank you !
>>
>>
>
Re: Apache2 + PHP-FPM
February 05, 2010 10:40AM
Please type "top" and copy the output here .
Maybe the PHPFCGI do not start correctly.
You are suggested to see Apache error log and php-fpm error log.

On 5 February 2010 16:20, Michael Shadle <mike503@gmail.com> wrote:

> use nginx :)
>
> honestly i don't want to take the time to try to figure out apache+fastcgi
> :(
>
> On Fri, Feb 5, 2010 at 1:26 AM, Dan Fekete <drdande@gmail.com> wrote:
> > Thank you for replies!
> > I'm trying to configure with libapache2_mod_fastcgi without too much
> > luck :(((
> > My config is:
> >
> > FastCGIExternalServer /fast-cgi-fake-handler -host
> > 127.0.0.1:9000
> > DocumentRoot /var/www/
> >
> > <Directory />
> > Options FollowSymLinks +ExecCGI
> > AllowOverride None
> > AddType application/x-httpd-fastphp5 .php
> > Action application/x-httpd-fastphp5 /fast-cgi-fake-
> > handler
> > </Directory>
> >
> > It just timeouts or connection is reset. Any ideas?
> > Thank you!!
> >
> > On Feb 4, 12:56 pm, Michael Shadle <mike...@gmail.com> wrote:
> >> same way you'd configure apache w/ php through fastcgi - using
> >> mod_fastcgi or mod_fcgid or whatever and pointing it to the socket or
> >> ip:port
> >>
> >> should be transparent.On Thu, Feb 4, 2010 at 3:42 AM, Dan Fekete <
> drda...@gmail.com> wrote:
> >> > Hi!
> >> > Could please someone point me in the right direction how to configure
> >> > PHP-FPM with Apache 2?
> >> > Thank you !
> >>
> >>
> >
>
Dan Fekete
Re: Apache2 + PHP-FPM
February 09, 2010 11:32AM
Problem kinda solved.
If anyone is interested, I've set FastCgiExternalServer directive so
that the directory points to my webroot, and then
referenced from the virtualhost to that. It wasn't easy to figure,
because somewhy my load balancer sometimes failed to route the
request, and I without doubt tought it was a problem with the FastCGI
configuration. Anyways the fastcgi problem is somewhat solved, thanks
for your
help.

On Feb 5, 4:37 pm, Mostafa Ghadamyari <m.gha...@gmail.com> wrote:
> Please type "top" and copy the output here .
> Maybe the PHPFCGI do not start correctly.
> You are suggested to see Apache error log and php-fpm error log.
>
> On 5 February 2010 16:20, Michael Shadle <mike...@gmail.com> wrote:
>
> > use nginx :)
>
> > honestly i don't want to take the time to try to figure out apache+fastcgi
> > :(
>
> > On Fri, Feb 5, 2010 at 1:26 AM, Dan Fekete <drda...@gmail.com> wrote:
> > > Thank you for replies!
> > > I'm trying to configure with libapache2_mod_fastcgi without too much
> > > luck :(((
> > > My config is:
>
> > >        FastCGIExternalServer /fast-cgi-fake-handler -host
> > > 127.0.0.1:9000
> > >        DocumentRoot /var/www/
>
> > >        <Directory />
> > >                Options FollowSymLinks +ExecCGI
> > >                AllowOverride None
> > >                AddType application/x-httpd-fastphp5 .php
> > >                Action application/x-httpd-fastphp5 /fast-cgi-fake-
> > > handler
> > >        </Directory>
>
> > > It just timeouts or connection is reset. Any ideas?
> > > Thank you!!
>
> > > On Feb 4, 12:56 pm, Michael Shadle <mike...@gmail.com> wrote:
> > >> same way you'd configure apache w/ php through fastcgi - using
> > >> mod_fastcgi or mod_fcgid or whatever and pointing it to the socket or
> > >> ip:port
>
> > >> should be transparent.On Thu, Feb 4, 2010 at 3:42 AM, Dan Fekete <
> > drda...@gmail.com> wrote:
> > >> > Hi!
> > >> > Could please someone point me in the right direction how to configure
> > >> > PHP-FPM with Apache 2?
> > >> > Thank you !
>
>
Re: Apache2 + PHP-FPM
March 07, 2010 02:19PM
Sorry for going on with this non-NGiNX related discussion, but I'm rathe rstuck with a similar problem. Would you mind sharing your working config? I've been trying to get this to work, but was unsuccessful. Tried your pasted snippet (adjusting it to my environment), but it failed, problems ranging from 404 to 500 internal server error. I got the following to work, but it's painfully slow, it behaves as if PHP was run using simple CGI, I don't know what I missed:

[code]
FastCGIExternalServer /php-fpm-handler -socket /tmp/php-fpm.sock
AddHandler php-cgi .php
Action php-cgi /php-fpm-handler.fcgi
ScriptAlias /php-fpm-handler.fcgi /php-fpm-handler
[/code]

Thanks!
agentc0re
Re: Apache2 + PHP-FPM
March 28, 2010 01:42PM
Did you ever get a good working configuration for your setup? I've
posted what i have now (it's not a php-fpm setup) but maybe it might
help in figuring it out.
http://groups.google.com/group/highload-php-en/browse_thread/thread/fb9f8cfcb07758a2/bd951f3efc66b3e8#bd951f3efc66b3e8

Your Script in your scriptalias, what are the contents of the
script?

On Mar 7, 1:19 pm, "kobuki" <nginx-fo...@nginx.us> wrote:
> Sorry for going on with this non-NGiNX related discussion, but I'm rathe rstuck with a similar problem. Would you mind sharing your working config? I've been trying to get this to work, but was unsuccessful. Tried your pasted snippet (adjusting it to my environment), but it failed, problems ranging from 404 to 500 internal server error. I got the following to work, but it's painfully slow, it behaves as if PHP was run using simple CGI, I don't know what I missed:
>
>     FastCGIExternalServer /php-fpm-handler -socket /tmp/php-fpm.sock
>     AddHandler php-cgi .php
>     Action php-cgi /php-fpm-handler.fcgi
>     ScriptAlias /php-fpm-handler.fcgi /php-fpm-handler
>
> Thanks!
>
> Posted at Nginx Forum:http://forum.nginx.org/read.php?3,50382,61167#msg-61167

To unsubscribe from this group, send email to highload-php-en+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 279
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready