Apache2 issues in hestiacp

When attempting to run my script, which worked flawlessly on fcgi i’m encountering 500 followed by:

[Sun May 03 13:11:38.376439 2020] [proxy:warn] [pid 4733] [client 195.112.122.110:60430] AH01144: No protocol handler was valid for the URL /index.php (scheme '|fcgi'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
[Sun May 03 13:11:38.750641 2020] [proxy:warn] [pid 4732] [client 195.112.122.110:60432] AH01144: No protocol handler was valid for the URL /index.php (scheme '|fcgi'). If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://<domain>

when trying to actually get the list of apache modules installed via apache2 -M i get the following:

[Sun May 03 13:18:29.139135 2020] [core:warn] [pid 8538] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Sun May 03 13:18:29.139535 2020] [core:warn] [pid 8538] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Sun May 03 13:18:29.139663 2020] [core:warn] [pid 8538] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Sun May 03 13:18:29.139784 2020] [core:warn] [pid 8538] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Sun May 03 13:18:29.161383 2020] [core:warn] [pid 8538] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
AH00543: apache2: bad user name ${APACHE_RUN_USER}

once again, fresh install

Probaly this one here (first google result): apache 2.2 - Apache2 config variable is not defined - Server Fault

Please share more informations about your system, your install string you used for hestia and about your script.

Ubuntu 18.04.4LTS, 2gb ram, used an install wizard, hostname wasn’t bound to the domain of this box, used default os one.

Script snippet

probaly mod_fcgid isnt enabled? Doesnt look at all, that this issues are related to hestia itself :slight_smile:.

Module fcgid already enabled

Can’t blame anything else, clean install after all (both OS and hestia)

Without serverside debuging, I don’t think we can help you out with your script. Infact this isnt a hestia sided issue, you’ll need to find a sysadmin to help you out here.

Or maybe another user of the community can help you out?

are you sure? Perhaps maybe it’s php-fpm issue that chewed it that way? Maybe there’s a way to also get a fcgi php 7.3/7.4 to run it on?

That we can’t help out without additional informations or a server sided debugging? yes

This is both possible, the services are running in default stack and can be adjusted like you want. But we can’t do that adjustment for you, this is a part on your side as admin :slight_smile:.

So you are saying that bundling hestiacp with php-fpm was an outstanding move? How preposterous. At least you could bundle it with both php-frm and fcgi. Given that there’s multiphp there should be a way to switch between versions anyway.

Of course, that’s why we got now a fast and reliable multiphp stack.

You’re free to help us out developing also multiphp using fcgi, just checkout the code and send us a pull request. That it isnt there doesnt mean that we do not want to have it, mostly it is just a time based issues - all members that are working on this project, do this for free - beside their 100% job.

Also fcgi wasnt disabled at all, probaly you just need to create a custom template to get it working - but I can’t guide you how to do it, because I do not know your system and requirements from your script. It completly depends on what you want to do.

my requirements == same as vestacp defaults (since it was installed beforehand until exim4 broke) + fresh 7.3 install with most of the php modules, as for system - same specs as the other box, same ubuntu 18.04.4LTS, same 2gb ram, different boxes tho :smiley:

and no, i’m afraid i can’t push changes in bash scripts/complex configs/templates since i’m a strictly a php/mysql dev

-Can you share the composer file for that script so I can check on a test install?
-Do you have the same problem with a minimal php script (like a hello-world) ?
-Is there a .htacces file in public_html folder?
-Are you using a default apache template or a custom one?

sure, here goes

nope, barebones scripts work

yes, it’s required for the router to work

<IfModule mod_rewrite.c>
    Options -MultiViews

    RewriteEngine On
    #RewriteBase /path/to/app
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</IfModule>

default, 7_3 for php-fpm

Cannot reproduce the problem on apache2 with nginx as reverse proxy (Hestia 1.1.1 + multiphp).

Unlock route works ok

:~$ curl http://aolko.mydomain.eu/unlock/
Invalid action, redirecting...

Changes done to index.php : here

Are you using plain apache2 without nginx reverse proxy? ()

i’m using apache2+nginx which is a default installation, after tinkering a bit based on your edits i’ve managed to get it to work, thanks

Can you please show, what you’ve changed to your script? Just in case someone ended on the same issue as you.

Summary

basically moved requires/includes to the top, no idea how this thing worked a couple of years w/o that tweak

:2 require 'inc/autoload.php';
:3 require 'lib/func.php'; //my functions
:4 include 'lib/msg.php'; //my dep script
1 Like