diff --git a/core/modules/file/file.install b/core/modules/file/file.install
index a975eed..5f020a1 100644
--- a/core/modules/file/file.install
+++ b/core/modules/file/file.install
@@ -69,39 +69,42 @@ function file_requirements($phase) {
   if ($phase == 'runtime') {
     $description = NULL;
     $implementation = file_progress_implementation();
-    $server_software = \Drupal::request()->server->get('SERVER_SOFTWARE');
-
-    // Test the web server identity.
-    if (preg_match("/Nginx/i", $server_software)) {
-      $is_nginx = TRUE;
-      $is_apache = FALSE;
-      $fastcgi = FALSE;
-    }
-    elseif (preg_match("/Apache/i", $server_software)) {
-      $is_nginx = FALSE;
-      $is_apache = TRUE;
-      $fastcgi = strpos($server_software, 'mod_fastcgi') !== FALSE || strpos($server_software, 'mod_fcgi') !== FALSE;
+    if ($implementation == 'uploadprogress') {
+      $value = t('Enabled (<a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress</a>)');
     }
     else {
-      $is_nginx = FALSE;
-      $is_apache = FALSE;
-      $fastcgi = FALSE;
-    }
+      $server_software = \Drupal::request()->server->get('SERVER_SOFTWARE');
+      $sapi_type = php_sapi_name();
 
-    if (!$is_apache && !$is_nginx) {
-      $value = t('Not enabled');
-      $description = t('Your server is not capable of displaying file upload progress. File upload progress requires an Apache server running PHP with mod_php or Nginx with PHP-FPM.');
-    }
-    elseif ($fastcgi) {
-      $value = t('Not enabled');
-      $description = t('Your server is not capable of displaying file upload progress. File upload progress requires PHP be run with mod_php or PHP-FPM and not as FastCGI.');
-    }
-    elseif (!$implementation) {
-      $value = t('Not enabled');
-      $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress library</a>.');
-    }
-    elseif ($implementation == 'uploadprogress') {
-      $value = t('Enabled (<a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress</a>)');
+      // Test the web server identity.
+      if (preg_match("/Nginx/i", $server_software)) {
+        $is_nginx = TRUE;
+        $is_apache = FALSE;
+        $fastcgi = FALSE;
+      }
+      elseif (preg_match("/Apache/i", $server_software)) {
+        $is_nginx = FALSE;
+        $is_apache = TRUE;
+        $fastcgi = substr($sapi_type, 0, 3) == 'cgi';
+      }
+      else {
+        $is_nginx = FALSE;
+        $is_apache = FALSE;
+        $fastcgi = FALSE;
+      }
+
+      if (!$is_apache && !$is_nginx) {
+        $value = t('Not enabled');
+        $description = t('Your server is not capable of displaying file upload progress. File upload progress requires an Apache server running PHP with mod_php or Nginx with PHP-FPM.');
+      }
+      elseif ($fastcgi) {
+        $value = t('Not enabled');
+        $description = t('Your server is not capable of displaying file upload progress. File upload progress requires PHP be run with mod_php or PHP-FPM and not as FastCGI.');
+      }
+      elseif (!$implementation) {
+        $value = t('Not enabled');
+        $description = t('Your server is capable of displaying file upload progress, but does not have the required libraries. It is recommended to install the <a href="http://pecl.php.net/package/uploadprogress">PECL uploadprogress library</a>.');
+      }
     }
     $requirements['file_progress'] = [
       'title' => t('Upload progress'),
