As suggested by Marko @capote, I investigated NinjaFirewall to replace Wordfence in WordPress.
All was working fine with WordPress and NinjaFirewall in the default directory (/var/lib/html).
When I installed NinjaFirewall in WordPress in a Vhost, it didn’t want to switch to Full WAF.
After exchanging with Marko, he found that in the file /etc/httpd/conf.d/virtualhosts.conf, I have to delete the “/” at the end of the line SetHandler(in 4 lines for each vhost), then restart httpd.
After the suppression of the “/” (in 4 lines for each vhost), all was working fine and NinjaFirewall was able to swtich to Full WAF in all Vhost directories.
After more investigations, I found that the reason it was working in the default directory and not in the Vhost one, was that in the file /etc/httpd/conf.d/www.conf , there is no “/” at the end of the lineSetHandler :
QUESTION #1:
Why there is an ending “/” in /etc/httpd/conf.d/virtualhosts.conf and not in /etc/httpd/conf.d/www.conf ?
QUESTION #2:
Why the difference between GUI 980 and GUI 9090:
GUI 980:
I think the bug is in the setting of the PHP version on both GUIs.
Thank a lot to Marko,
Michel-André
P.S. I prefer to use GUI 980 for the Vhost creation as it will use the name given to the vhost to create the vhost directory as GUI 9090 is using an hex number; is that the reason for the bug?
A name is easier to see than an hex number when you have multiple Vhosts.
My module(remi-safe) is working well as it is not using an ending “/” for the SetHandler for www.
That is the reason why it is possible to switch NinjaFirewall to Full WAF.
So the bug is in “the core package use the official SCL (limited to 7.3 currently)”
What is the solution you recommend for a Vhost as both modules insert an ending “/” for the SetHandler.
Or to put it in another way: Why my module doesn’t insert an ending “/” in www, but insert one for the Vhost
# use php-fpm with mod_proxy_fcgi by socket
# from Remi repository instead of the default PHP
<FilesMatch .php$>
SetHandler "proxy:unix:/var/run/php72-php-fpm/VHOSTNAME-php72.sock|fcgi://localhost/"
</FilesMatch>
This suggest that it is not the module handling the “www” that is causing the problem… or if it is the same module handling both, then it handles “www” differently than the “Vhost”.
Main goal, is it possible to take out the ending “/” ?
By default, FPM listens for incoming requests on a network socket but can use a Unix Domain Socket, which can slightly improve performance.
In Apache httpd configuration: (no ending “/”)