Error on Install: Apache required. running on php7.3 with Nginx & Varnish

G Kroschel Posted in Technical Support 5 months ago

I am running Apache.
Nginx, and Varnish.
When installing via Softaculous, i am receiving the error: "Apache required."
I am running on CentOS 7, with "CWP/Control WebPanel" Server.

Thanks

Replies
German ~Z~ Man Replied 5 months ago

No idea why we need all this extra fuzz since the problem HAS BEEN diagnosed already:

  • Ossn's installer is expecting either 'apache' or 'LiteSpeed' (both case-insensitive)
  • but G Kroschel's server is issuing 'CentOS WebPanel: Protected by Mod Security'

Thus, in order to make the installer proceed we can try to ...

  • either re-configure CWP to issue a string which includes apache or litespeed
  • or change the installer code to return true in any case (line 117)

Personally I would go for the latter one because I don't know which side-effects may result within the CWP package from a change like that.

us Bansh33 - Replied 5 months ago

it just occurred to me that you may be using nginx strictly as a reverse proxy. that shouldn't really affect anything - you just need to get your instance of Apache configured properly. I'm using a different reverse proxy (ngrok) with Apache (via the VM image) and this setup works perfectly for me. you may have to ask your webhost for some help here, I'm not really sure how you can make sure that your Apache is set up to properly serve php pages. You'll almost certainly have to go to w/ a manual installation as well, since it's your instance of Apache that's causing the problem.

us Bansh33 - Replied 5 months ago

I think the issue here is that your installation of Apache and/or PHP is not set up to serve PHP pages properly. If it were, you'd see an entry with "Apache" ( in the superglobal $SERVER['SERVERSOFTWARE'] as Z-Man explained. You don't have to output your entire phpinfo() if you want to verify this, just check that one variable. Unfortunately I don't have any suggestions beyond that, but hopefully that helps you at least diagnose the problem.

Also, I don't think anyone was "accusing" you of not actually running the software you specified, it was probably confusion due to the fact that nginx is generally used to speed up serving of static content. Since ossn is not static content, it doesn't add any value here. Then again, I'm not terribly experienced with nginx so maybe you have some other reason for running it that hasn't occurred to me.

us G Kroschel Replied 5 months ago

ok, well.. as a matter of fact. I am running Apache & Nginx.. that sounded kind of accusatory.
but at any rate, checked my Phpinfo, i am also running MOD_Security. so it wont show.
yes. i could "disable" that, just to "prove" that i am running what i said i was running.

but. in fact. why would i lie? smh.

SERVER_SOFTWARE CentOS WebPanel: Protected by Mod Security

and, in case i am mistaken/misunderstanding you..
to clarify, i AM running NGinx REVERSE PROXY..

anyways.
I was pretty sure i've seen this Issue posted Before, i used your search, but nothing returned.

German ~Z~ Man Replied 5 months ago

I see, and in a way this may be a good sign ... because if you'll get it made to install Ossn manually there's a good chance softaculous will do, too.

Ossn's webserver check looks like that:

if(preg_match('/apache/i', $_SERVER["SERVER_SOFTWARE"]) || preg_match('/LiteSpeed/i', $_SERVER["SERVER_SOFTWARE"])) {
        return true;
}

Write a little script like

<?php
phpinfo();
?>

save it to your main ossn directory, name it whateveryouwant.php and access it from your browser. Then simply use your browser's find and see what SERVER_SOFTWARE returns.

(in my case it's: SERVER_SOFTWARE Apache/2.4.37 (Ubuntu)

Honestly I have no idea why and whether you're really running Apache AND Nginx in parallel. But as long Apache isn't recognized by PHP, the Ossn installation won't proceed.

Perhaps anyone else here knows how to re-configure a CentOS machine - I have no idea. Most likely there's help available in a CentOS forum.

us G Kroschel Replied 5 months ago

i know i can install it manually, i would like to use my server/softaculous though, as it is also for clients. ugh. regardless, it faults the same way when tried manually.

German ~Z~ Man Replied 5 months ago

There's no need to install Ossn via Softaculous.
Simply choose an environment that meets Ossn's pre-requisites and install manually, see ...
https://www.opensource-socialnetwork.org/wiki/view/706/how-to-install-open-source-social-network