Skip to content
English
  • There are no suggestions because the search field is empty.

DUO 2FA authentication for new users returns "Failed to generate DUO QR Code."

Original Question or Issue:

When setting up DUO 2FA for the first time and using a proxy that requires outbound HTTP traffic, users encounter an error when logging in for the first time after DUO MFA is enabled. 

The DUO QR code may not get generated.


Environment:

  • Product - FileCloud Server
  • Version - Any
  • Platform - Windows, Linux

Steps to Reproduce:

 


Error or Log Message:

The server logs may show the following log snippets:

2026-11-03 7:15:54.011714 DEBUG: [1373982][17937081464174][] DUO preauth result {"function":"preauth","file":"/var/www/html/src/Core/Subsystem/Security/TwoFA/Handler/TwoFAHandlerDUO.php","preauth_result":{"response":{"stat":"FAIL","code":28,"message":"Failed to connect to api-4ccc589b.duosecurity.com port 443: Connection timed out"},"success":false,"http_status_code":null}}
2026-11-03 7:15:54.011817 INFO: [1373982][17937081464174][] Preauth failed []


Defect or Enhancement Number:

 


Cause:

 The Apache service was not configured to include both HTTP/HTTPS environment variables.


Resolution or Workaround:

To resolve this issue, the Apache/httpd service will need to be configured to include the proxy environment variables. 

Windows

  • Open System Properties

  • Go to Advanced >> Environment Variables
  • Create system variables with the lines below:
    • HTTP_PROXY=http://proxy.company.com:8080
      HTTPS_PROXY=http://proxy.company.com:8080
  • Restart Apache

Linux

  • Configure the httpd service by running the commands below:
    • sudo systemctl edit httpd
  • Add the following lines and save the changes.
    • [Service]
      Environment="http_proxy=http://proxy.company.com:8080"
      Environment="https_proxy=http://proxy.company.com:8080"
      Environment="HTTP_PROXY=http://proxy.company.com:8080"
      Environment="HTTPS_PROXY=http://proxy.company.com:8080"
  • Restart the httpd service using systemctl restart httpd

Notes: