Results 1 to 2 of 2

Thread: PHP-FPM 7.2 Configuration in Apache 2.4

  1. #1

    Default PHP-FPM 7.2 Configuration in Apache 2.4

    Hi All,

    Request your help on hot to configure PHP-FPM in Apache, was able to configure FastCGI and the info.php pages states "Server API CGI/FastCGI" , but not able to configure PHP-FPM below are my configurations and the info.php page does not state "Server API FPM/FastCGI"

    systemctl status php-fpm is showing that FMP is running without any issues.

    Apache Version : 2.4.38 (Linux/SUSE)
    PHP Version : 7.2.5

    Virtual Host Configuration
    <VirtualHost devstack.com:80>
    ServerAdmin admin@devstack.com
    ServerName devstack.com
    DocumentRoot /devstack/web/public
    ErrorLog /var/log/apache2/devstack/devstack-error_log
    CustomLog /var/log/apache2/devstack/devstack-access_log combined
    <Directory "/Playbooks/Automation/devstack/web/public">
    Options All +ExecCGI
    AllowOverride All
    Require all granted
    AddHandler fcgid-script .php
    Action fcgid-script /php-fcgi-scripts/php-fcgi-starter.fcgi
    </Directory>
    </VirtualHost>

    FPM Configuration
    pool name = devstack
    user = wwwrun
    group = www
    listen = /var/run/php/devstack.sock
    listen.owner = wwwrun
    listen.group = www
    listen.mode = 0660
    pm = dynamic
    pm.max_children = 10
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3

    httpd.conf


    AddHandler fcgid-script .fcgi
    <FilesMatch "\.php$">
    AddHandler fcgid-script .php
    Options +ExecCGI
    FcgidWrapper /devstack/web/public/php-fcgi-scripts/php-fcgi-starter.fcgi .php
    </FilesMatch>


    Configuration Tested:



    If I add the below lines in the virtualhost.conf file or httpd.conf file the page is getting downloaded why accessing it form the browser

    <FilesMatch \.php$>
    SetHandler "proxy:unix:/var/run/php/devstack.sock|fcgi://localhost"
    </FilesMatch>

    No changes if I add the below lines in virtualhost.conf file

    <IfModule mod_fastcgi.c>
    SetHandler 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/devstack.sock -pass-header Authorization
    </IfModule>


    From,
    Vino.B

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,114

    Default Re: PHP-FPM 7.2 Configuration in Apache 2.4

    Hello and welcome here.

    You choose OTHER VERSION from the prefix menu, which means that you use an unsupported version of openSUSE. People here will still try to help you when they can, but telling them what version you use is in this case the more important so they get a bit of a feeling of what your environment is and how far they have to go back in time in their memory.
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •