Welcome! Log In Create A New Profile

Advanced

How to use PHP-FPM (from sources) with Apache2 ?

Posted by Troll 
Troll
How to use PHP-FPM (from sources) with Apache2 ?
September 18, 2010 05:00AM
Hello,


I've tried so many tutorials on the internet and never got one
working.

I am "simply" trying to get Apache2 running with PHP-FPM.

I am under Debian 5 Lenny. I install apache and the mod mod_fastcgi
using the packages and then I install php from the sources (for a
couple of future reasons) using the ./configure --enable-fpm.

Then I configured Apache FastCGI Mod using this :

<IfModule mod_fastcgi.c>
ScriptAlias /fcgi-bin/ "/usr/local/apache2/fcgi-bin/"
FastCGIExternalServer /usr/local/apache2/fcgi-bin/php-cgi -host
127.0.0.1:9000 –pass-header Authorization
AddHandler php-fastcgi .php
Action php-fastcgi /fcgi-bin/php-cgi
</IfModule>



But now I try accessing http://localhost/ for test, I am asking if I
want to download index.php... The content is sent with header
"application/x-httpd-php", and is not parsed by PHP at all, as I can
see the PHP code if I select "Download".


I don't know what's wrong... If someone can help me, please :)
Sammie Taunton
Re: How to use PHP-FPM (from sources) with Apache2 ?
September 18, 2010 11:20AM
What errors are you receiving? Did you start FPM? What version of PHP?

Sent from my iPhone

On Sep 18, 2010, at 3:59, Troll <trollofdarkness@gmail.com> wrote:

> Hello,
>
>
> I've tried so many tutorials on the internet and never got one
> working.
>
> I am "simply" trying to get Apache2 running with PHP-FPM.
>
> I am under Debian 5 Lenny. I install apache and the mod mod_fastcgi
> using the packages and then I install php from the sources (for a
> couple of future reasons) using the ./configure --enable-fpm.
>
> Then I configured Apache FastCGI Mod using this :
>
> <IfModule mod_fastcgi.c>
> ScriptAlias /fcgi-bin/ "/usr/local/apache2/fcgi-bin/"
> FastCGIExternalServer /usr/local/apache2/fcgi-bin/php-cgi -host
> 127.0.0.1:9000 –pass-header Authorization
> AddHandler php-fastcgi .php
> Action php-fastcgi /fcgi-bin/php-cgi
> </IfModule>
>
>
>
> But now I try accessing http://localhost/ for test, I am asking if I
> want to download index.php... The content is sent with header
> "application/x-httpd-php", and is not parsed by PHP at all, as I can
> see the PHP code if I select "Download".
>
>
> I don't know what's wrong... If someone can help me, please :)
Troll
Re: How to use PHP-FPM (from sources) with Apache2 ?
September 18, 2010 01:20PM
No errors, just .php weren't parsed, just pushed for download...
And I've started FPM of course, for PHP, it's the last (5.3.3) with FPM
bundled-in.

I was finally very lucky and have found (on the Nth page of Google (I
stopped counting... I've been looking for the solution for one week))
the exact configuration, that's working :

<IfModule mod_fastcgi.c>
FastCGIExternalServer /usr/local/sbin/php-fpm -socket /tmp/php-fpm.sock
AddHandler php-fastcgi .php
Action php-fastcgi /usr/local/sbin/php-fpm.fcgi
ScriptAlias /usr/local/sbin/php-fpm.fcgi /usr/local/sbin/php-fpm
<Directory /usr/local/sbin>
Options ExecCGI FollowSymLinks
SetHandler fastcgi-script
Order allow,deny
Allow from all
</Directory>
</IfModule>



But now I am looking for the way to make one pool = one vhost. Because,
with nginx we can specify different socket (if I remember well) but I
don't know about apache2.
I will try to put the FastCGIExternalServer in a <Vhost
XXX.XXX.XXX.XXX:80></Virtualhost> and see.

On 09/18/2010 05:18 PM, Sammie Taunton wrote:
> What errors are you receiving? Did you start FPM? What version of PHP?
>
> Sent from my iPhone
>
> On Sep 18, 2010, at 3:59, Troll<trollofdarkness@gmail.com> wrote:
>
>> Hello,
>>
>>
>> I've tried so many tutorials on the internet and never got one
>> working.
>>
>> I am "simply" trying to get Apache2 running with PHP-FPM.
>>
>> I am under Debian 5 Lenny. I install apache and the mod mod_fastcgi
>> using the packages and then I install php from the sources (for a
>> couple of future reasons) using the ./configure --enable-fpm.
>>
>> Then I configured Apache FastCGI Mod using this :
>>
>> <IfModule mod_fastcgi.c>
>> ScriptAlias /fcgi-bin/ "/usr/local/apache2/fcgi-bin/"
>> FastCGIExternalServer /usr/local/apache2/fcgi-bin/php-cgi -host
>> 127.0.0.1:9000 –pass-header Authorization
>> AddHandler php-fastcgi .php
>> Action php-fastcgi /fcgi-bin/php-cgi
>> </IfModule>
>>
>>
>>
>> But now I try accessing http://localhost/ for test, I am asking if I
>> want to download index.php... The content is sent with header
>> "application/x-httpd-php", and is not parsed by PHP at all, as I can
>> see the PHP code if I select "Download".
>>
>>
>> I don't know what's wrong... If someone can help me, please :)
Diemuzi
Re: How to use PHP-FPM (from sources) with Apache2 ?
September 18, 2010 04:12PM
It took me a while to figure this out and someone here helped me quite
a bit in getting it working properly. Here is how my setup looks
(thanks to those to helped) and so I hope it helps you:

# httpd.conf

# FPM / FastCGI
<IfModule mod_fastcgi.c>
FastCgiIpcDir /tmp/fcgi_ipc/
FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -
idle-timeout 240 -maxClassProcesses 1 -pass-header HTTP_AUTHORIZATION
FastCgiWrapper /usr/local/apache/bin/suexec

<FilesMatch \.php$>
SetHandler php5-fcgi
</FilesMatch>

<Location "/fcgi-bin">
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS
</Location>

Action php5-fcgi /fcgi-bin
</IfModule>

# httpd-vhosts.conf

# FPM / FastCGI (Per VirtualHost)
<IfModule mod_fastcgi.c>
FastCgiExternalServer /tmp/virtualuser-fpm80 -socket php-fpm.sock -
user virtualuser -group virtualuser
Alias /fcgi-bin /tmp/virtualuser-fpm80
</IfModule>

The /tmp/virtualuser-fpm80 should not exist in this example. I also
chose to use the socket instead of the host but it will work just the
same for you by replacing the socket with the host command you are
using.

My FPM configurations are under /usr/local/etc/fpm.d and named each by
the user of the VirtualHost. As labeled above I have a user called
"virtualuser"

# virtualuser.conf

[virtualuser]
listen = /tmp/fcgi_ipc/php-fpm.sock
listen.backlog = -1
listen.owner = apache
listen.group = apache
listen.mode = 0750
user = virtualuser
group = virtualuser
pm = static
pm.max_children = 1
chroot = /
catch_workers_output = no
slowlog = /usr/local/apache/logs/php-fpm.log.slow

I hope this helps you get things running with Apache 2 and FPM

On Sep 18, 11:55 am, Troll <trollofdarkn...@gmail.com> wrote:
>   No errors, just .php weren't parsed, just pushed for download...
> And I've started FPM of course, for PHP, it's the last (5.3.3) with FPM
> bundled-in.
>
> I was finally very lucky and have found (on the Nth page of Google (I
> stopped counting... I've been looking for the solution for one week))
> the exact configuration, that's working :
>
> <IfModule mod_fastcgi.c>
>   FastCGIExternalServer /usr/local/sbin/php-fpm -socket /tmp/php-fpm.sock
>   AddHandler php-fastcgi .php
>   Action php-fastcgi /usr/local/sbin/php-fpm.fcgi
>   ScriptAlias /usr/local/sbin/php-fpm.fcgi /usr/local/sbin/php-fpm
> <Directory /usr/local/sbin>
>    Options ExecCGI FollowSymLinks
>    SetHandler fastcgi-script
>    Order allow,deny
>    Allow from all
> </Directory>
> </IfModule>
>
> But now I am looking for the way to make one pool = one vhost. Because,
> with nginx we can specify different socket (if I remember well) but I
> don't know about apache2.
> I will try to put the FastCGIExternalServer in a <Vhost
> XXX.XXX.XXX.XXX:80></Virtualhost> and see.
>
> On 09/18/2010 05:18 PM, Sammie Taunton wrote:
>
> > What errors are you receiving? Did you start FPM? What version of PHP?
>
> > Sent from my iPhone
>
> > On Sep 18, 2010, at 3:59, Troll<trollofdarkn...@gmail.com>  wrote:
>
> >> Hello,
>
> >> I've tried so many tutorials on the internet and never got one
> >> working.
>
> >> I am "simply" trying to get Apache2 running with PHP-FPM.
>
> >> I am under Debian 5 Lenny. I install apache and the mod mod_fastcgi
> >> using the packages and then I install php from the sources (for a
> >> couple of future reasons) using the ./configure --enable-fpm.
>
> >> Then I configured Apache FastCGI Mod using this :
>
> >> <IfModule mod_fastcgi.c>
> >> ScriptAlias /fcgi-bin/ "/usr/local/apache2/fcgi-bin/"
> >> FastCGIExternalServer /usr/local/apache2/fcgi-bin/php-cgi -host
> >> 127.0.0.1:9000 –pass-header Authorization
> >> AddHandler php-fastcgi .php
> >> Action php-fastcgi /fcgi-bin/php-cgi
> >> </IfModule>
>
> >> But now I try accessinghttp://localhost/for test, I am asking if I
> >> want to download index.php... The content is sent with header
> >> "application/x-httpd-php", and is not parsed by PHP at all, as I can
> >> see the PHP code if I select "Download".
>
> >> I don't know what's wrong... If someone can help me, please :)
>
>
Troll
Re: How to use PHP-FPM (from sources) with Apache2 ?
September 18, 2010 05:04PM
Hello,

Thank you for your useful answer.

So you are using the same socket for all pools but different users.

I've tried the reversed way : different socket but same user (www-data)
and I am getting all pools working on request from all vhosts... x_x"

I will try your way...

On 09/18/2010 10:10 PM, Diemuzi wrote:
> It took me a while to figure this out and someone here helped me quite
> a bit in getting it working properly. Here is how my setup looks
> (thanks to those to helped) and so I hope it helps you:
>
> # httpd.conf
>
> # FPM / FastCGI
> <IfModule mod_fastcgi.c>
> FastCgiIpcDir /tmp/fcgi_ipc/
> FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -
> idle-timeout 240 -maxClassProcesses 1 -pass-header HTTP_AUTHORIZATION
> FastCgiWrapper /usr/local/apache/bin/suexec
>
> <FilesMatch \.php$>
> SetHandler php5-fcgi
> </FilesMatch>
>
> <Location "/fcgi-bin">
> Order Deny,Allow
> Deny from All
> Allow from env=REDIRECT_STATUS
> </Location>
>
> Action php5-fcgi /fcgi-bin
> </IfModule>
>
> # httpd-vhosts.conf
>
> # FPM / FastCGI (Per VirtualHost)
> <IfModule mod_fastcgi.c>
> FastCgiExternalServer /tmp/virtualuser-fpm80 -socket php-fpm.sock -
> user virtualuser -group virtualuser
> Alias /fcgi-bin /tmp/virtualuser-fpm80
> </IfModule>
>
> The /tmp/virtualuser-fpm80 should not exist in this example. I also
> chose to use the socket instead of the host but it will work just the
> same for you by replacing the socket with the host command you are
> using.
>
> My FPM configurations are under /usr/local/etc/fpm.d and named each by
> the user of the VirtualHost. As labeled above I have a user called
> "virtualuser"
>
> # virtualuser.conf
>
> [virtualuser]
> listen = /tmp/fcgi_ipc/php-fpm.sock
> listen.backlog = -1
> listen.owner = apache
> listen.group = apache
> listen.mode = 0750
> user = virtualuser
> group = virtualuser
> pm = static
> pm.max_children = 1
> chroot = /
> catch_workers_output = no
> slowlog = /usr/local/apache/logs/php-fpm.log.slow
>
> I hope this helps you get things running with Apache 2 and FPM
>
> On Sep 18, 11:55 am, Troll<trollofdarkn...@gmail.com> wrote:
>> No errors, just .php weren't parsed, just pushed for download...
>> And I've started FPM of course, for PHP, it's the last (5.3.3) with FPM
>> bundled-in.
>>
>> I was finally very lucky and have found (on the Nth page of Google (I
>> stopped counting... I've been looking for the solution for one week))
>> the exact configuration, that's working :
>>
>> <IfModule mod_fastcgi.c>
>> FastCGIExternalServer /usr/local/sbin/php-fpm -socket /tmp/php-fpm.sock
>> AddHandler php-fastcgi .php
>> Action php-fastcgi /usr/local/sbin/php-fpm.fcgi
>> ScriptAlias /usr/local/sbin/php-fpm.fcgi /usr/local/sbin/php-fpm
>> <Directory /usr/local/sbin>
>> Options ExecCGI FollowSymLinks
>> SetHandler fastcgi-script
>> Order allow,deny
>> Allow from all
>> </Directory>
>> </IfModule>
>>
>> But now I am looking for the way to make one pool = one vhost. Because,
>> with nginx we can specify different socket (if I remember well) but I
>> don't know about apache2.
>> I will try to put the FastCGIExternalServer in a<Vhost
>> XXX.XXX.XXX.XXX:80></Virtualhost> and see.
>>
>> On 09/18/2010 05:18 PM, Sammie Taunton wrote:
>>
>>> What errors are you receiving? Did you start FPM? What version of PHP?
>>> Sent from my iPhone
>>> On Sep 18, 2010, at 3:59, Troll<trollofdarkn...@gmail.com> wrote:
>>>> Hello,
>>>> I've tried so many tutorials on the internet and never got one
>>>> working.
>>>> I am "simply" trying to get Apache2 running with PHP-FPM.
>>>> I am under Debian 5 Lenny. I install apache and the mod mod_fastcgi
>>>> using the packages and then I install php from the sources (for a
>>>> couple of future reasons) using the ./configure --enable-fpm.
>>>> Then I configured Apache FastCGI Mod using this :
>>>> <IfModule mod_fastcgi.c>
>>>> ScriptAlias /fcgi-bin/ "/usr/local/apache2/fcgi-bin/"
>>>> FastCGIExternalServer /usr/local/apache2/fcgi-bin/php-cgi -host
>>>> 127.0.0.1:9000 –pass-header Authorization
>>>> AddHandler php-fastcgi .php
>>>> Action php-fastcgi /fcgi-bin/php-cgi
>>>> </IfModule>
>>>> But now I try accessinghttp://localhost/for test, I am asking if I
>>>> want to download index.php... The content is sent with header
>>>> "application/x-httpd-php", and is not parsed by PHP at all, as I can
>>>> see the PHP code if I select "Download".
>>>> I don't know what's wrong... If someone can help me, please :)
>>
Troll
Re: How to use PHP-FPM (from sources) with Apache2 ?
September 19, 2010 11:38AM
Hello,

I can't use the -group and -user parameters as I don't use suExec.

But strangely, I can't have one vhost = one pool.
It seems the last FastCGIExternalServer that it's loaded (so, the one
which is in the last vhost loaded...) is overriding the other ones.
So all requests are bound to the last socket (used for the last
vhost).
But I'm not sure using -group or -user will change anything, since it
seems to be Apache that can have only one FastCGIExternalServer...

I post my configuration here, if someone can help me :)

# mods-enabled/fastcgi.conf
<IfModule mod_fastcgi.c>
FastCGIExternalServer /usr/local/sbin/php-fpm -socket /tmp/php-
fpm.sock
AddHandler php-fastcgi .php
Action php-fastcgi /usr/local/sbin/php-fpm.fcgi
ScriptAlias /usr/local/sbin/php-fpm.fcgi /usr/local/sbin/php-fpm
<Directory /usr/local/sbin>
Options ExecCGI FollowSymLinks
SetHandler fastcgi-script
Order allow,deny
Allow from all
</Directory>
</IfModule>



# sites-enabled/firstweb.vhost
<VirtualHost *:80>
ServerName firstweb.example.com
ServerAdmin firstweb@example.com
DocumentRoot /home/www/firstweb/public_html
Options None

# Fast CGI + FPM
FastCGIExternalServer /tmp/firstweb-fpm -socket /tmp/php-
fpm.sock
ScriptAlias /tmp/firstweb-fpm /usr/local/sbin/php-fpm
<Directory /home/www/firstweb/public_html>
Options SymLinksIfOwnerMatch ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

# Log
ErrorLog /var/log/apache2/error-firstweb.log
LogLevel warn
CustomLog /var/log/apache2/access-firstweb.log combined
</VirtualHost>

# sites-enabled/secondweb.vhost

<VirtualHost *:80>
ServerName secondweb.example.com
ServerAdmin firstweb@example.com
DocumentRoot /home/www/secondweb/public_html
Options None

# Fast CGI + FPM
FastCGIExternalServer /tmp/secondweb-fpm -socket /tmp/php-
fpm2.sock
ScriptAlias /usr/local/sbin/php-fpm /tmp/secondweb-fpm
<Directory /home/www/secondweb/public_html>
Options SymLinksIfOwnerMatch ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>

# Log
ErrorLog /var/log/apache2/error-secondweb.log
LogLevel warn
CustomLog /var/log/apache2/access-secondweb.log combined
</VirtualHost>




#/usr/local/etc/php-fpm.conf

[www]
# socket
listen = /tmp/php-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
# user ID/GID
user = www-data
group = www-data
# pool
pm = dynamic
pm.max_children = 60
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 10

[www2]
# socket
listen = /tmp/php-fpm2.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0666
# user ID/GID
user = pcw
group = pcw
# pool
pm = dynamic
pm.max_children = 60
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 10





And with this configuration, neither I benchmark on
secondweb.example.com or firstweb.example.com, it always the pool
[www] that's used.

Thanks in advance for your help, I completely doesn't understand
what's the freak...


Troll

On 18 sep, 22:56, Troll <trollofdarkn...@gmail.com> wrote:
>   Hello,
>
> Thank you for your useful answer.
>
> So you are using the same socket for all pools but different users.
>
> I've tried the reversed way : different socket but same user (www-data)
> and I am getting all pools working on request from all vhosts... x_x"
>
> I will try your way...
>
> On 09/18/2010 10:10 PM, Diemuzi wrote:
>
> > It took me a while to figure this out and someone here helped me quite
> > a bit in getting it working properly. Here is how my setup looks
> > (thanks to those to helped) and so I hope it helps you:
>
> > # httpd.conf
>
> > # FPM / FastCGI
> > <IfModule mod_fastcgi.c>
> >    FastCgiIpcDir /tmp/fcgi_ipc/
> >    FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -
> > idle-timeout 240 -maxClassProcesses 1 -pass-header HTTP_AUTHORIZATION
> >    FastCgiWrapper /usr/local/apache/bin/suexec
>
> >    <FilesMatch \.php$>
> >            SetHandler php5-fcgi
> >    </FilesMatch>
>
> >    <Location "/fcgi-bin">
> >            Order Deny,Allow
> >            Deny from All
> >            Allow from env=REDIRECT_STATUS
> >    </Location>
>
> >    Action php5-fcgi /fcgi-bin
> > </IfModule>
>
> > # httpd-vhosts.conf
>
> > # FPM / FastCGI (Per VirtualHost)
> >    <IfModule mod_fastcgi.c>
> >            FastCgiExternalServer /tmp/virtualuser-fpm80 -socket php-fpm.sock -
> > user virtualuser -group virtualuser
> >            Alias /fcgi-bin /tmp/virtualuser-fpm80
> >    </IfModule>
>
> > The /tmp/virtualuser-fpm80 should not exist in this example. I also
> > chose to use the socket instead of the host but it will work just the
> > same for you by replacing the socket with the host command you are
> > using.
>
> > My FPM configurations are under /usr/local/etc/fpm.d and named each by
> > the user of the VirtualHost. As labeled above I have a user called
> > "virtualuser"
>
> > # virtualuser.conf
>
> > [virtualuser]
> > listen = /tmp/fcgi_ipc/php-fpm.sock
> > listen.backlog = -1
> > listen.owner = apache
> > listen.group = apache
> > listen.mode = 0750
> > user = virtualuser
> > group = virtualuser
> > pm = static
> > pm.max_children = 1
> > chroot = /
> > catch_workers_output = no
> > slowlog = /usr/local/apache/logs/php-fpm.log.slow
>
> > I hope this helps you get things running with Apache 2 and FPM
>
> > On Sep 18, 11:55 am, Troll<trollofdarkn...@gmail.com>  wrote:
> >>    No errors, just .php weren't parsed, just pushed for download....
> >> And I've started FPM of course, for PHP, it's the last (5.3.3) with FPM
> >> bundled-in.
>
> >> I was finally very lucky and have found (on the Nth page of Google (I
> >> stopped counting... I've been looking for the solution for one week))
> >> the exact configuration, that's working :
>
> >> <IfModule mod_fastcgi.c>
> >>    FastCGIExternalServer /usr/local/sbin/php-fpm -socket /tmp/php-fpm.sock
> >>    AddHandler php-fastcgi .php
> >>    Action php-fastcgi /usr/local/sbin/php-fpm.fcgi
> >>    ScriptAlias /usr/local/sbin/php-fpm.fcgi /usr/local/sbin/php-fpm
> >> <Directory /usr/local/sbin>
> >>     Options ExecCGI FollowSymLinks
> >>     SetHandler fastcgi-script
> >>     Order allow,deny
> >>     Allow from all
> >> </Directory>
> >> </IfModule>
>
> >> But now I am looking for the way to make one pool = one vhost. Because,
> >> with nginx we can specify different socket (if I remember well) but I
> >> don't know about apache2.
> >> I will try to put the FastCGIExternalServer in a<Vhost
> >> XXX.XXX.XXX.XXX:80></Virtualhost>  and see.
>
> >> On 09/18/2010 05:18 PM, Sammie Taunton wrote:
>
> >>> What errors are you receiving? Did you start FPM? What version of PHP?
> >>> Sent from my iPhone
> >>> On Sep 18, 2010, at 3:59, Troll<trollofdarkn...@gmail.com>    wrote:
> >>>> Hello,
> >>>> I've tried so many tutorials on the internet and never got one
> >>>> working.
> >>>> I am "simply" trying to get Apache2 running with PHP-FPM.
> >>>> I am under Debian 5 Lenny. I install apache and the mod mod_fastcgi
> >>>> using the packages and then I install php from the sources (for a
> >>>> couple of future reasons) using the ./configure --enable-fpm.
> >>>> Then I configured Apache FastCGI Mod using this :
> >>>> <IfModule mod_fastcgi.c>
> >>>> ScriptAlias /fcgi-bin/ "/usr/local/apache2/fcgi-bin/"
> >>>> FastCGIExternalServer /usr/local/apache2/fcgi-bin/php-cgi -host
> >>>> 127.0.0.1:9000 �pass-header Authorization
> >>>> AddHandler php-fastcgi .php
> >>>> Action php-fastcgi /fcgi-bin/php-cgi
> >>>> </IfModule>
> >>>> But now I try accessinghttp://localhost/fortest, I am asking if I
> >>>> want to download index.php... The content is sent with header
> >>>> "application/x-httpd-php", and is not parsed by PHP at all, as I can
> >>>> see the PHP code if I select "Download".
> >>>> I don't know what's wrong... If someone can help me, please :)
>
>
Momchil Ivanov
Re: How to use PHP-FPM (from sources) with Apache2 ?
September 20, 2010 04:58PM
> listen = /tmp/php-fpm.sock

There have been some issues when using unix sockets in the nginx/fpm setup,
try using tcp sockets.
Re: How to use PHP-FPM (from sources) with Apache2 ?
October 25, 2010 02:34AM
I used your guide and it helped to a certain point but keep getting this error in my logs:

[Mon Oct 25 22:35:20 2010] [error] [client 97.95.36.54] File does not exist: /var/www/html/fcgi-bin

It seems like my alias isn't working with fcgi...

I have this in httpd.conf:
<IfModule mod_fastcgi.c>
FastCgiIpcDir /tmp/fcgi_ipc/
FastCgiConfig -autoUpdate -singleThreshold 100 -killInterval 300 -idle-timeout 240 -maxClassProcesses 1 -pass-header HTTP_AUTHORIZATION
FastCgiWrapper /usr/sbin/suexec

<FilesMatch \.php$>
SetHandler php5-fcgi
</FilesMatch>

<Location "/fcgi-bin">
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS
</Location>

Action php5-fcgi /fcgi-bin
</IfModule>

And this in the virtualhost:

SuexecUserGroup webapps webapps
Alias /fcgi-bin /fcgi-extsrvs-phpfpm
<IfModule mod_fastcgi.c>
FastCgiExternalServer /fcgi-extsrvs-phpfpm -socket /tmp/fcgi_icp/php-fpm.sock -user webapps -group webapps
</IfModule>
<Directory /var/www/html/>
Options +ExecCGI +Includes -Indexes
</Directory>



Any ideas?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready