I've set up NGINX in front of Apache to pass requests to. For one of my subdomains, I've made it so the traffic goes through NGINX and then through Apache, as the PHP system on this subdomain requires Apache to run (needing functions such as apache_get_modules
).
For the main domain/other subdomains, data just goes straight through NGINX. I'm using PHP-FPM for this.
However, on this sub-domain that passes requests to Apache, I have an installer to install the system I'm wanting. However I'm getting this error:
Fatal error: Uncaught Error: Call to undefined function apache_get_version() in /var/www/subdomain.example.com/html/installer/index.php:80 Stack trace: #0 /var/www/subdomain.example.com/html/installer/index.php(240): checkDependencies() #1 {main} thrown in /var/www/subdomain.example.com/html/installer/index.php on line 80
So the application on the sub-domain is unable to access the apache functions that would normally work. I'm running PHP 7.3-FPM and I've already configured it to work with apache using libapache2-mod-fastcgi
etc.
The phpinfo page for this subdomain says:
Server API: FPM/FastCGI
$_SERVER['SERVER_SOFTWARE']: Apache/2.4.25 (Debian)
This tells us the page is being served through Apache after NGINX as intended, however can't load apache functions as above?
Is there something missing? Could you help point me in the right direction? Thankyou so much, any support helps.