0

This error occurs despite all the fixes that I Googled.

Apache was loaded next modules:

# /usr/local/apache/bin/apachectl -M | grep proxy
[Thu Mar 14 22:37:35.825542 2024] [core:trace3] [pid 9087:tid 140083932002176] core.c(3472): Setting LogLevel for all modules to trace8
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using *** Set the 'ServerName' directive globally to suppress this message
 proxy_module (shared)
 proxy_connect_module (shared)
 proxy_ftp_module (shared)
 proxy_http_module (shared)
 proxy_fcgi_module (shared)
 proxy_scgi_module (shared)
 proxy_uwsgi_module (shared)
 proxy_fdpass_module (shared)
 proxy_wstunnel_module (shared)
 proxy_ajp_module (shared)
 proxy_balancer_module (shared)
 proxy_express_module (shared)
 proxy_hcheck_module (shared)

My VirtualHost conf:

<VirtualHost 1.2.3.4:8181>
        ServerName example.com
        ServerAlias www.example.com
        ServerAdmin [email protected]
        DocumentRoot /home/example/sites/example.com
        UseCanonicalName Off
        # ScriptAlias /cgi-bin/ /home/example/sites/example.com/cgi-bin/

        #CustomLog /usr/local/apache/domlogs/example.com.bytes bytes
        #CustomLog /usr/local/apache/domlogs/example.com.log combined
        ErrorLog /usr/local/apache/domlogs/example.com.error.log

        suPHP_Engine off

        # Redirect to the proxy
        <FilesMatch \.php$>
            ProxyFCGISetEnvIf "true" SCRIPT_FILENAME "/sites/example.com%{reqenv:SCRIPT_NAME}"
            SetHandler proxy:unix:/run/php-fpm/php-fpm-unix.sock
        </FilesMatch>

        <Directory "/home/example/sites/example.com">
                Options -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
                AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
        </Directory>
</VirtualHost>

php-fpm.d/www.conf

listen = "/run/php-fpm/php-fpm-unix.sock"

I use Nginx -> Apache2.4 -> php-fpm upon CWP admin control panel on CentOS 7

UPD1: (Possible SOLVED)

I setted php-fpm to use TCP port 9000:

listen = 127.0.0.1:9000
    <Proxy "fcgi://localhost:9000/" enablereuse=on max=10>
    </Proxy>
    # Redirect to the proxy
    <FilesMatch \.php$>
        SetHandler proxy:fcgi://localhost:9000
    </FilesMatch>

It's work, but proxying to UNIX is'nt work. Maybe cause:

{{ # If your version of httpd is 2.4.9 or newer (or has the back-ported feature), you can use the unix domain socket}}

{{ #SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/"}}

https://cwiki.apache.org/confluence/display/HTTPD/PHP-FPM

My apache version is:

# /usr/local/apache/bin/apachectl -V
Server version: Apache/2.4.57 (Unix)

Maybe, question is solved.

1
  • php-fpm access.log is empty, Maybe apache doesn't even connect it.
    – YpaHeL1
    Commented Mar 14 at 20:22

0

You must log in to answer this question.

Browse other questions tagged .