edwardspec / mediawiki-aws-s3

Extension:AWS allows MediaWiki to use Amazon S3 (instead of the local directory) to store images.
https://www.mediawiki.org/wiki/Extension:AWS
GNU General Public License v2.0
42 stars 32 forks source link

No such bucket when using custom domain #60

Closed Facerafter closed 1 year ago

Facerafter commented 1 year ago

When using the following config we get an error 'NoSuchBucket' as its looking for a bucket with the name media.starcitizen.tools which indeed does not exist... the 'normal' url is sct-images.eu-central-1.linodeobjects.com and we have cname from media.starcitizen.tools to sct-images.eu-central-1.linodeobjects.com

$wgAWSBucketName = 'sct-images';
$wgAWSBucketDomain = 'media.starcitizen.tools';
$wgAWSRepoHashLevels = '2';
$wgAWSRepoDeletedHashLevels = '3';
$wgFileBackends['s3']['endpoint'] = 'https://eu-central-1.linodeobjects.com';
$wgAWSRegion = 'eu-central-1';

I assume I have misconfigured something but im not sure what...

edwardspec commented 1 year ago

Configuration seems correct: here Extension:AWS uses the bucket called sct-images to store/retrieve things. Value of $wgAWSBucketDomain is only used for public URLs of images (place from where the visitors download them).

Anything suspicious in the log? $wgDebugLogGroups['FileOperation'] = "/path/to/some/writable/file.log";

Facerafter commented 1 year ago

Gonna close this, seems like its a Linode issue that needs special config in the bucket name. https://www.linode.com/community/questions/20202/how-can-i-setting-cloudflare-cname-link-object-storage-and-use-cdn

Thanks anyway.