Increase Proxy Timeout in Apache

By default, Apache has a timeout limit for proxy requests. For long-running operations—such as extensive database imports, large file exports, or complex background processing—you may need to increase this limit to prevent 504 Gateway Timeout errors.

Configuration Steps

  1. Access your server via SSH and create a new configuration include file in the Apache vhosts directory:
    /var/local/LxRoot/apache/vhosts/proxytimeout.conf
  2. Add the following content to the file to set the timeout to 600 seconds (10 minutes):
                            TimeOut 600
    ProxyTimeout 600
                            
                        
  3. Apply the changes by performing a Graceful Restart of the webserver via the LxRoot UI.

Pro Tip: While increasing the timeout allows scripts more time to finish, ensure your PHP execution limits (max_execution_time) are also adjusted to match, otherwise PHP may terminate the script before Apache reaches the proxy timeout.