Changing File Storage Path

By default, SupportPal uses file-based storage in the /storage directory. In some cases, the storage location can be changed to another directory or a specialist system such as Amazon S3 or Memcached.

Contents

The local file storage, /storage directory, is broken down into 3 sub-directories. If you would like to move the entire /storage directory outside of the web root this must be done in separate steps. The steps for updating each sub-directory have been outlined below:

Application Storage

By default attachments and other caches are stored locally to the /storage/app directory within your SupportPal installation directory. It is possible to change the location of this directory, and we also support storing some files on Amazon S3:

Local

If you would like to change the default directory, create or update /config/production/filesystems.php as below:


    <?php

    return [

        'default' => 'local',

        'disks' => [

            'local' => [
                'driver' => 'local',
                'root'   => '/absolute/path/to/writable/directory', // Do not include trailing slash
            ],

        ],

    ];

Amazon S3

If you would like to configure an Amazon S3 filesystem, create or update /config/production/filesystems.php as below:


    <?php

    return [

        'default' => 's3',

        'disks' => [

            's3' => [
                'driver' => 's3',
                'key'    => 'your-key',
                'secret' => 'your-secret',
                'region' => 'your-region',
                'bucket' => 'your-bucket',
            ],

        ],

    ];

If you would like to use a S3-compatible service such as Minio, you may need to add endpoint and use_path_style_endpoint to the configuration. Create or update /config/production/filesystems.php as below:


    <?php

    return [

        'default' => 's3',

        'disks' => [

            's3' => [
                'driver'   => 's3',
                'key'      => 'your-key',
                'secret'   => 'your-secret',
                'region'   => 'your-region',
                'bucket'   => 'your-bucket',
                'endpoint' => 'http://localhost:9600/',
                'use_path_style_endpoint' => true,
            ],

        ],

    ];

Framework Storage Directories

The /storage/framework directory is broken down into a number of smaller sub-directories.

Cache

For details on updating the cache file store, please see: Changing Cache Store.

Sessions

By default, SupportPal uses file storage and all PHP sessions are stored in the /storage/framework/sessions directory.

For details on updating the session store, please see: Session Configuration.

Views

The /storage/framework/views directory is used to store compiled copies of templates, this helps to speed up the load-time of your application. It's possible to change the location of this directory to outside the web root:


    <?php

    return [

        /*
        |--------------------------------------------------------------------------
        | Compiled View Path
        |--------------------------------------------------------------------------
        |
        | This option determines where all the compiled Blade templates will be
        | stored for your application. Typically, this is within the storage
        | directory. However, as usual, you are free to change this value.
        |
        */

        'compiled' => realpath('/absolute/path/to/writable/directory'), // Do not include a trailing slash.

    ];

Logs

By default, all SupportPal application logs are stored in the /storage/logs directory. It is possible to change the directory where logs are stored:


    <?php return array (
      'key' => 'eH5kVisy6vKsxVIU4hlw9CeztsDBd2Q8',
      'log_path' => '/absolute/path/to/logs', // Do not include a trailing slash.
    );