Solved FreeBSD 12.1 + Apache 2.4 + PHP 7.2.x + Joomla (Once had internet-no-longer)

Hey everyone!

I wasn't sure if I was allowed to post this here since it appears like a Joomla problem. However I was doing things on the server and I have a feeling it's something I tweaked or changed. Here is what happened to the best of my memory.

I had 2 domains up and running with Joomla (both worked great and connected to the internet in Admin panel, etc. Updates... 100%). Then I added 5 Static IP's to my server; configured them, updated BIND9 and all went fine.

I then received some assistance from anlashok regarding PHP-FPM configuration being correct w/ Apache 2.4. It worked and I moved forward with resolving any and all start-up errors with dmesg -a.

Then I started setting up each additional Domain since I added the Static IP's. Now I believe it was right before this, during or after (Don't quite know now) that I was reading a blog or website regarding Hardening and I installed and started to configure modsecurity.

I was able to install the Joomla site's perfectly; re-write took, all is great at this point.

Then I noticed something across the new domain's... I wasn't being prompted to update Joomla from my Rocket Theme Rocketlauncher (that's never current version).

I attempted some troubleshooting and ruled out it being Joomla's fault.

I asked for assistance on Joomla forum and a Norweigan advised me to go try to update a different way. When performing this path; I was able to dump an error that proved I wasn't resolving DNS correctly from within Joomla Admin.

I then logged into the first 2 TLD's that were working fine. Logged into Joomla back end and attempted to do an update. Same error.

With that said... I disabled modsecurity; I looked in php.ini for "allow_url_fopen" and it was set to "On"; I also tried "allow_url_fopen = 1"


I will continue to work on this and if somebody has ever run into this or believes they could assist me in troubleshooting. I would be grateful.

Regardless I will update with Solution.

~ Brandon Kastning
 
Alright; so after hours on troubleshooting. Here was my Solve!

While hardening PHP; I had this line on my active php.ini located in /usr/local/etc/php/php.ini :

Code:
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open, curl_exec, curl_multi_exec, parse_ini_file
vs.

New One as Recommended by https://docs.joomla.org/Security_Checklist/Hosting_and_Server_Setup

Correct line:

Code:
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open

Also I updated my entire system using "pkg upgrade" in /usr/ports.

The changes didn't fix until after a reboot of system, which was a relief; however I wish I knew what exactly triggered the solve! Perhaps the php.ini loads into server memory regardless of restarting apache24.

Best Regards and God Bless,

Brandon Kastning
 
You also need to restart php-fpm service if you change PHP settings, as you are using that to handle PHP
anlashok,

Thank you. For some reason; no matter the situation with the sites working or when they are not (right now I ran into a white screen of death issue TLD wide due to misconfigured mod_security I believe)... restarting PHP-FPM never does anything on my server. It just says it's not running.

When I was using CentOS I was able to cycle the service without problems. It's much different on FreeBSD for me in my experience.
 
Back
Top