Re: configure apache2 on ubuntu 16.04 vps to use php-fpm is not leading to the desired outcome

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I see you have libapache2-mod-php7.0 installed.  Are you sure you disabled it?  In Ubuntu you can use a2dismod to disable modules.  I suspect mod_php is listed there.  It's not required when you want to do fpm.

On Tue, Jul 25, 2017 at 10:02 AM, Luca Toscano <toscano.luca@xxxxxxxxx> wrote:
Hi Dino,


2017-07-23 1:32 GMT+02:00 Dino Vliet <dino_vliet@xxxxxxxxx.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?



Hope that helps!

Luca 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux