1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CDN via FTP

Discussion in 'Server Configuration and Hosting' started by Wuebit, Dec 8, 2013.

  1. Wuebit

    Wuebit Well-Known Member

    Been away for sometime and "trying" to catch up. Is there an option to use CDN via FTP?

    Had a search and all I seem to find is maxcdn etc....

    Cheers
     
  2. Floren

    Floren Well-Known Member

    What is FTP? :)
     
    Wuebit likes this.
  3. Wuebit

    Wuebit Well-Known Member

    From a guy who knows everything I guess your taking the piss out me for using FTP ;)
    Well I have two servers and though why not store images on the other. If there is a better way than ftp i'm all ears.
     
  4. Mouth

    Mouth Well-Known Member

    Add to config.php ???
    PHP:
    $config['externalDataUrl'] = 'ftp://ftp.site.com/data';
    Don't know why you'd want to though - that would be terribly slow with handshaking etc.
     
  5. Wuebit

    Wuebit Well-Known Member

    And this syncs all the attachments over? can't be that easy no?
     
  6. Mouth

    Mouth Well-Known Member

    No, you'd have to use rsync - or similar - for that functionality
     
  7. Wuebit

    Wuebit Well-Known Member

    Was quite fast back on VB (vb optimise had it iirc.)
     
  8. Floren

    Floren Well-Known Member

    Just to understand better, you want to sync on a regular basis the files between 2 Linux servers? Are you referring to using attachments and images on a different server? For example, you store the php files on server1 and images on server2. If yes, what web server do you use?
     
  9. Wuebit

    Wuebit Well-Known Member

    Well not really, All attachments on say Server B and the rest of xenforo on Server A. Make sense? I'm just thinking out loud here :D
     
  10. Floren

    Floren Well-Known Member

    Ya, I thought so. FTP wont work. :)
    What web server you use? With Nginx is very easy to achieve this:
    Code:
    location /data {
            ...
            proxy_pass http://internalip:internalport
            ...
    }
    This will always push your images to the second server. Read the documentation how to set it up properly.
     
    Wuebit likes this.
  11. Wuebit

    Wuebit Well-Known Member

    Aye I'm on Nginx thanks Floren.
     
  12. akia

    akia Well-Known Member

  13. Wuebit

    Wuebit Well-Known Member

  14. Floren

    Floren Well-Known Member

    If you want to be fancy, use nginx as load balancer and sync the attachments in between the 2 servers.
    Personally, I would use one machine for web and the other for db. Nginx is crazy fast to server static files.
     
    Wuebit likes this.
  15. Wuebit

    Wuebit Well-Known Member

    It would have to be mega basic for me to do it :p I think the proxy_pass part would be pushing my skills lol.
     

Share This Page