Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx Wordpress Pushing new Vhost creation to multi-server environment

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Simon Brown, Nov 10, 2017.

  1. Simon Brown

    Simon Brown Premium Member Premium Member

    22
    2
    3
    Feb 9, 2017
    Ratings:
    +5
    Local Time:
    9:54 PM
    1.11.9
    Hello,
    I'm sure this has been covered somewhere on this forum but I've tried many different searches but can't find any info...

    How do people push a new Wordpress vhost config & database to multiple servers in a HA environment?

    I have 7 nones using a Galera Cluster so I think Galera will handle the Database duplication. I'm just wondering if anyone has a script they can share to push the vhost configs to multiple servers and then reload Nginx.

    Many thanks for any advice/scripts shared.

    Si
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,631
    6,862
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,308
    Local Time:
    7:54 AM
    Nginx 1.13.x
    MariaDB 5.5
    Need to load balance on web end too with distributed file storage setups.

    Centmin Mod is provide as is, so short of scripted related bugs or issues, any further optimisation to the web stack components - nginx, php-fpm, mariadb mysql, csf firewall etc or web app specific configurations are left to the Centmin Mod user to deal with. So I do not provide any free support for such.

    However, Centmin Mod users are free to help each other out and ask questions or give answers on this community forum. My hopes are that this community forum evolves so that more veteran long time Centmin Mod users help new Centmin Mod users out :)

    Centmin Mod's Nginx has all the nginx modules it requires for you to configure nginx reverse proxy, nginx based load balancing and proxy caching (with exception of the shared file system you'd need i.e. NFS, GlusterFS and any mysql database cluster/replication). You just have to configure it yourself :)

    For nginx reverse proxy & load balancing read the documentation, tutorial and guides below
    Or you can use Haproxy as a load balancer Beta Branch - addons/haproxy.sh preview

    Some folks also use tools like puppet, salt or ansible for multi server configs. Or basic private git repo syncing could work. That is what I use for vhost configs across my cluster of 16+16 = 32 VPS servers for centminmod.com.
     
  3. Simon Brown

    Simon Brown Premium Member Premium Member

    22
    2
    3
    Feb 9, 2017
    Ratings:
    +5
    Local Time:
    9:54 PM
    1.11.9
    Hi, many thanks for your fast reply. I've already set up the failover/load balancing with Cloudflare. So far it's been a fantastic option. I have servers in the UK, USA & Australia. Galera Cluster is syncing the DBs and is also working really well.

    I have a disk image I deploy to new nodes which has centminmod and web, DB, CSF, etc. already set up.

    I'll be bringing a load of websites over to the new environment as well as creating new sites. It just got me thinking of the best way to push sites/configs from a master node to the rest of the nodes.

    I have lsyncd syncing the website files across the nodes. Maybe I'll look into using it to watch the config directories as well.... Hmmmmm

    Discussion open... What does the Centmin community use for multiserver syncing?
     
    • Informative Informative x 1