httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Toscano <toscano.l...@gmail.com>
Subject Re: [users@httpd] configure apache2 on ubuntu 16.04 vps to use php-fpm is not leading to the desired outcome
Date Tue, 25 Jul 2017 08:02:43 GMT
Hi Dino,


2017-07-23 1:32 GMT+02:00 Dino Vliet <dino_vliet@yahoo.com.invalid>:
>
> Modified this file:
>
> /etc/apache2/sites-available/000-default.conf to now have this inside:
>
>
>  <Directory /usr/lib/cgi-bin>
>
>   Require all granted
>
>   </Directory>
>
>   <IfModule mod_fastcgi.c>
>
>   AddHandler php7-fcgi .php
>
>   Action php7-fcgi /php7-fcgi virtual
>
>   Alias /php7-fcgi /usr/lib/cgi-bin/php7-fcgi
>
>   FastCgiExternalServer /usr/lib/cgi-bin/php7-fcgi -socket
> /var/run/php/php7.0-fpm.sock -pass-header Authorization
>
>   </IfModule>
>

In here it seems that you are using mod_fastcgi (configured to not manage
FCGI processes afaict)

>
> Also modified this file /etc/apache2/conf-available and now it contains
>
>
> # Redirect to local php-fpm if mod_php is not available
>
> <IfModule !mod_php7.c>
>
>   # Enable http authorization headers
>
>   SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
>
>
>   <FilesMatch ".+\.ph(p[3457]?|t|tml)$">
>
>   SetHandler "proxy:unix:/run/php/php7.0-fpm.sock|fcgi://localhost"
>
>   </FilesMatch>
>

And in here mod_proxy_fcgi? Are you sure that this is what you wanted to
achieve?


> However, when I look at the output of the info.php page I have created in
> the document root I see Server API --> Apache 2.0 Handler in stead of what
> I expected after fiddling with the configuration. I expected Server API -->
> FPM/FastCGI
>
>
> What have I missed and what should I do to have apache2 run with FastCGI?
>

I'd suggest to follow
https://httpd.apache.org/docs/2.4/mod/mod_proxy_fcgi.html and
https://wiki.apache.org/httpd/php to gather more info :)

Hope that helps!

Luca

Mime
View raw message