In addition, you need to create Virtuozzo Hybrid Infrastructure directories to modify the default functionality.

Change to the document root directory of your WHMCS server (for example, /srv/http) and create the following directories in it:

  • whmcs/includes/staas_scripts
  • whmcs/admin/staas_scripts

Change to the directory whmcs/includes/staas_scripts.

The first file you need to create includes the S3 configuration. Create a configuration file S3_getConfig.php with the following contents, replacing variables as follows:

  • s3_key with your S3AcessKeyId,
  • s3_secret with your S3SecretAccessKey,
  • s3_gateway with your configured S3 gateway address, and
  • whmcs_username with your WHMCS admin username.

// Return array with default configuration.
if (!function_exists('S3_getConfig')) {
    function S3_getConfig() {

        // s3 login.
        $vars['s3_key'] = "939e2ac6916b57082P9O";
        $vars['s3_secret'] = "tVYF3kZD9zcTtl6q6QDTHaZKM2nuq4xVcl8ikJpd";

        // s3 gateway.
        $vars['s3_gateway'] = "";

        // whmcs login.
        $vars['whmcs_username'] = "admin";

        // Return config array.
        return $vars;