Aliyun, Cloud, Linux

NextCloud使用阿里云OSS作为默认存储

2021年12月26日

在config.php配置文件的 );前插入下面的代码

'objectstore' => [
        'class' => '\\OC\\Files\\ObjectStore\\S3',
        'arguments' => [
                'bucket' => 'xxx', //存储桶名称
                'autocreate' => false,
                'key'    => 'LTAIxxxxxxx', //AK
                'secret' => 'y1YdyUiIxxxxx', //SK
                'hostname' => 'oss-ap-southeast-1.aliyuncs.com', //输入对应的Endpoint
                'port' => "",
                'use_ssl' => false,
                'region' => 'oss-ap-southeast-1.aliyuncs.com', //输入对应的Endpoint
                // required for some non Amazon S3 implementations
                'use_path_style'=>false
        ],
],

参考:

https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/primary_storage.html?highlight=s3

You Might Also Like

No Comments

Leave a Reply

%d 博主赞过: