0

My sites very large size with image and file upload.

So, I would like to setup as CDN from another my server2 VPS from current server1 VPS. That server will be storage images and files upload.

I knew magento can change url storage from baseUrl and baseSecureUrl. However I dont know how to map 2 server and sync that.

Anyone can suggest me step by step create storage like that?

4
  • Is your goal to reduce storage space on your server or to reduce the load on your server from all the image requests and processing? – Dan Roberts Sep 23 '19 at 9:29
  • @DanRoberts I would like to storage space and image on another server – the light Sep 25 '19 at 15:05
  • Try the Sirv extension. It'll copy your files to another server and delete the Magento generated images fro your server, which you don't need. marketplace.magento.com/magictoolbox-sirv.html – Dan Roberts Sep 25 '19 at 18:41
  • @DanRoberts that extension use amazon S3 and take a lot of cost. Any suggest? – the light Sep 29 '19 at 4:32
0
          > [ media.vps2.server ] >
user ---->                        -----> [ nfs disk ]
          > [ www.vps1.server   ] >

you can use some sort of proxy/cache server config with shared NFS disk. dynamic will be served from one server, statics will be served from another server,

https://www.google.com/search?q=nginx+proxy+images+to+another+server https://www.nginx.com/blog/nginx-caching-guide/

DNS two ip addresses:

  1. media.shop.com
  2. www.shop.com

media/static base url will be pointed to subdomain.

0

In terms of magento configuration something like this

https://magento.stackexchange.com/a/68908/70343

To keep media folder in sync something like this

https://serverfault.com/a/665968

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.