Question

Two droplets, one domain

Posted February 20, 2020 127 views
NginxWordPress

I have two droplets, one with .net core application and second with WordPress.
How can I set up domain to be used for example:

  • domain.com/* - .net core droplet
  • domain.com/blog/* - wordpress droplet Best regards.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello @gaffkins,

This is achievable without a problem! You’ll need to create your Nginx configuration file for your website domian.com set the DocumentRoot to let’s say /var/www/domain.com and there you’ll have your main .net core application. To have your WordPress in a /blog ULR, you’ll just need to create a folder in the following place - /var/www/domain.com/blog and that’s it.

Of course, you’ll need to install PHP, MySQL/MariaDB in order to run WordPress however the good thing is DigitalOcean have a pretty good article on how to do so - https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-18-04

Regards,
KDSys

by Justin Ellingwood
WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and...
  • Hi @KDSys,
    as I understand your way is to use one droplet with ubuntu to host .net and wordpress.
    In my approach I want to use two separate droplets, one Wordpress droplet and second clear ubuntu.
    Regards and thank you,
    Gaffkins

    • Yes, you are correct. I believe it’s a lot more simpler than what you are aiming for and I’ll explain why in a bit.

      If you are keen on going with two droplets, you have 2 options the way I see it

      1. You should be able to actually configure some sorts of internal load balancing/HaProxy setup which will internally route traffic. What I don’t like about that is that anything breaks, or you are having a lot of traffic or anything similar as an issue, you’re gonna have a really hard time pinpointing and fixing the issue.

      2. Create a subdomain blog.domain.com and point it to the second droplet. That way you’ll have a separate droplet for both applications and won’t have all that complex networking or any other kind of setup.

      At least that’s my opinion, there might be other people which think differently and might post here their solutions.

      Regards,
      KDSys

Submit an Answer