0

I currently have a server hosted on a Comcast IP address with one website running on it. The server is a tower running Ubuntu, and the website runs on a VM with a Wordpress LAMP stack. I am going to add another Wordpress LAMP stack on another VM and want another domain to go to this new stack.

What options would there be to accomplish this? I have been told a reverse proxy would work, but are there other options?

1
  • Reverse proxy (either using Apache or NGINX) is probably the easiest to implement
    – Cas
    Dec 14, 2016 at 13:58

1 Answer 1

1

There are a number of options, but all will be variants of reverse proxying which is a technology. Apache can do this by using mod_proxy (and that is the way I would do it, but you can also get other reverse proxy servers).

Another option would be to forgo the difficulties associated with reverse proxying on the router/VM host and simply have each site on a differen port, and use the router to redirect the traffic as appropriate. The downside of this approach would be that the second site would need a url like http://site.name:81 to reach it externally.

Lastly, its unclear why you want to spin up a second VM for the second site - the easiest way to this whole thing would be to simply keep the current single VM with Apache, and then use name based virtual hosting to host 2 websites of the single VM. Its quite straightforward to have multiple insances of Wordpress on a single install of apache, each in its own Virtualhost, and more resource efficient as well.

4
  • Hey davidgo, thanks so much for your response. To be honest with you the reason I want to use another VM is because the way I set it up was with a WordPress LAMP stack and really I just feel like for me it would be easier to redo what I did before because I'm not terribly experienced. However you make a good point and I may want to look into it further. It's just been so long since I combed through my apache server I am almost a bit intimidated lol. I wouldn't really know how to go about installing another instance of WP and setting up a database. Nov 9, 2016 at 21:44
  • It will be a lot easier to set up a second instance on the same server then to work out how to handle reverse proxying. As far as setting up the new virtual hosts, you can go to digitalocean.com/community/tutorials/… and follow from Step 4. While its not ideal, you can share a single database for both instances of Wordpress. To do this, download and install the wordpress files in the new virtualhost...
    – davidgo
    Nov 9, 2016 at 22:36
  • then copy the file wp_config.php from the existing to new instance and modify the line "$table_prefix = "wp_" to "$table_prefix = site2_" - this will then have 2 separate sets of tables in the 1 database - so no need to create a new database instance. The disadvantage is that if you want to get rid of the old instance, you will need to drop a lot of tables rather then a single database.
    – davidgo
    Nov 9, 2016 at 22:37
  • Setting up a new instance of Wordpress is as easy as downloading the zip file, uncompressing it and uploading it to the appropriate directory.
    – davidgo
    Nov 9, 2016 at 22:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .