Title: Apache not identified properly
Last modified: August 22, 2016

---

# Apache not identified properly

 *  [aurimas_m](https://wordpress.org/support/users/aurimas_m/)
 * (@aurimas_m)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/apache-not-identified-properly/)
 * Just to make sure this is noticed, I’m posting it separately.
 * If you are running Wordfence 5.3.6 and you are getting an error “You are using
   an Nginx web server and using a FastCGI processor like PHP5-FPM” even though 
   you are using Apache server with PHP-FPM, here’s how you can get this fixed (
   I hope this is fixed in newer versions)
 * The problem is that WF assumes that it’s enough to have $sapi == ‘fpm-fcgi’ to
   consider server running nginx. Which is a wrong assumption, because you can run
   fpm-fcgi with apache just as well. And that’s exactly what I’m running. It could
   be also a bug in the code (hence, the assumption, because it also checks $_SERVER[‘
   SERVER_SOFTWARE’] as an extra test).
 * So here’s what you need to do to fix it:
 * 1. Open wp-content/plugins/wordfence/lib/wfUtils.php
    2. Go to line 615 3. Replace“
   ||” with “&&”
 * Here’s the code that you are going to be altering for the reference:
 *     ```
       public static function isNginx(){
                       $sapi = php_sapi_name();
                       $serverSoft = $_SERVER['SERVER_SOFTWARE'];
                       if($sapi == 'fpm-fcgi' || stripos($serverSoft, 'nginx') !== false){
                               return true;
                       }
       ```
   
 * What you’re doing is changing the test so that it requires that both sapi equals
   fpm-fcgi AND server software says nginx rather than one or the other being sufficient
   evidence for server to be running nginx.
 * [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)

Viewing 1 replies (of 1 total)

 *  [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * (@wfsupport)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/apache-not-identified-properly/#post-5879335)
 * Thanks. The dev team is looking into this.
 * tim

Viewing 1 replies (of 1 total)

The topic ‘Apache not identified properly’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [apache](https://wordpress.org/support/topic-tag/apache/)
 * [nginx](https://wordpress.org/support/topic-tag/nginx/)

 * 1 reply
 * 2 participants
 * Last reply from: [WFSupport](https://wordpress.org/support/users/wfsupport/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/apache-not-identified-properly/#post-5879335)
 * Status: not resolved