Legacy Needs Amazon Cloudfront support, not Amazon S3

Status
Not open for further replies.

furnival

Customer
This needs Amazon Cloudfront support, at the moment it only uses Amazon S3 but S3 is designed for storing data whereas Cloudfront is Amazon's CDN.

Is there some way I can manually edit some files to make VBulletin use my Cloudfront URL instead of my S3 URL, please?
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
I wouldn't be able to tell you that, the API is probably vastly different. I'll flag this as Under Consideration :)
 
I wouldn't be able to tell you that, the API is probably vastly different. I'll flag this as Under Consideration :)

I do not believe you would need to spend time connecting to a new API.
This is how it works. I create an Amazon S3 account > I upload files there (via your mod) > I associate my Amazon Cloudfront account with that S3 "bucket", then instead of an s3.amazonws.com URL I get a cloudfront.net fixed URL. > I need to use this Cloudfront URL to serve my content.

So your mod needs to be able to
1) upload to Amazon S3 just as it already does
2) Allow the user to tell the mod to use the Cloudfront URL not the S3 URL.

Does this make sense please? And does it sound like I could set up Cloudfront manually using the bespoke CDN option in VBOptimise as it is now please?
 
I tried using the replacement variable manager to change the S3 URLs to the CLoudfront URLs, and then flushed the cache, but it didn't seem to make any difference.
 
You can try changing the following code in /dbtech/vboptimise_pro/includes/cdn/amazon_s3/cdn.php:
PHP:
	public function get_url()
	{
		return 'http://' . $this->cdn_settings['bucket'] . '.s3.amazonaws.com';
	}
and see if that works.
 
You can try changing the following code in /dbtech/vboptimise_pro/includes/cdn/amazon_s3/cdn.php:
PHP:
	public function get_url()
	{
		return 'http://' . $this->cdn_settings['bucket'] . '.s3.amazonaws.com';
	}
and see if that works.

OK I should be able to work something out based on this. Thank you
 
Changing this code did change the URLs of many of the images but most of the css files are still being served from the bucketname.s3.amazonaws.com URL. Is there another setting I need to change please Fillip H.?
 
You may need to re-sync the files, as the CSS files are processed with the URL prior to uploading.
 
Can you please elaborate what steps are needed to use cloudfront?

I have got mine working with S3 but I have no clue what I need to change for cloudfront.
 
Can you please elaborate what steps are needed to use cloudfront?

I have got mine working with S3 but I have no clue what I need to change for cloudfront.

furnival, would you be able to share your code changes?

Sorry for the late reply. Fillip H. gave the change needed in the post #5 above: http://www.dragonbyte-tech.com/f42/...port-not-amazon-s3-15977-post83489/#post83489 the only thing I did as far as I remember was change the s3.amazonws.com part of the PHP code in that cdn.php file to my cloudfront URL, which was [some_prefix_unique_to_your_account].cloudfront.net
 
Status
Not open for further replies.
Back
Top