• Greetings. I am a member of 3 Masonic Lodges and recently set up a WordPress site for each. Those links are:

    https://www.newport358.org
    https://www.elvinehelms926.org
    https://www.robertburnsnewport.com

    I put each of them online in the order listed above. Initially each had its own VM on VMware running Ubuntu 14.04.1. Each system had WordPress installed in /var/www/html/ and each had its own local database named wordpress. All 3 sites worked flawlessly and do once again now that I’ve gone back to the original configuration. I have an apache frontend server I use to direct all of that traffic to various backend servers. Initially my httpd.conf looked like this for each WordPress server/site:

    <VirtualHost *:80>
            ServerName www.newport358.org
            ProxyRequests Off
            ProxyPreserveHost On
            ProxyVia full
            ProxyPass / https://192.168.0.3/
            ProxyPassReverse / https://192.168.0.3/
    </VirtualHost>

    I wanted to merge down to one server, so I went to each of the three servers are zipped up /var/www/html/ and used mysqldump to export each wordpress database. I then unzipped the copy of each site as follows:

    /var/www/html/358
    /var/www/html/926
    /var/www/html/163

    I restored each database, that had formerly been named wordpress, into new databases: wp_358, wp_926, wp_163.

    I then changed httpd.conf on my frontend server to this:

    <VirtualHost *:80>
            ServerName www.newport358.org
            ProxyRequests Off
            ProxyPreserveHost On
            ProxyVia full
            ProxyPass / https://192.168.0.4/358/
            ProxyPassReverse / https://192.168.0.4/358/
    </VirtualHost>

    I then added to httpd.conf on the backend server:

    <VirtualHost *:80>
            ServerName www.newport358.org
            DocumentRoot /var/www/html/358/
    </VirtualHost>

    The front page loaded and I was hoping that all way well. Unfortunately… when logging in to /wp-admin/, after providing my credentials, I would get a 404. If I went back to newport358.org and refreshed, I would be logged in, but was getting a 404 instead of going directly to dashboard. Pages 2 and 3 of the newsfeed were 404 as well, each link was newport358.org/358/?paged=2 instead of just newport358.org/?paged=2 — I changed permalinks to a different style, then back to default hoping that would fix that but it did not.

    I wasn’t able to get everything working again before it was noticed I had broken our web sites so I currently have everything reverted to the original frontend server referencing 3 separate backend servers. Everything works as it did. I have searched for a few days trying to find the answer to this but have not been able to. I’ll manage these completely separate from one another if I have to, but I think I’ve just missed something small here and I’m guessing it’s probably somewhere in the reverse proxy since that part of my setup seems to be pretty unusual.

    For what it’s worth I did try modifying httpd.conf on my frontend to simply send the requests for these sites to the IP address only to try and let the backend server redirect to the directory… but that didn’t work for me either. None of the URLs changed so I was expecting this to be pretty straight forward.

    I know someone can figure out where I goofed up and get me going again. Thanks in advance for your help!

  • The topic ‘Merging 3 servers down to one with apache reverse proxy’ is closed to new replies.