Hey everyone, I am new to deployment and Digital Ocean in particular, so sorry in advance.

I deployed .NET Web App, ran it as a service on my Droplet, configured Nginx and linked it with my domain and SSL certificate. It works perfectly, I can access my app with https://my_domain.

The question is can I run another app on the same droplet with another domain and SSL certificate? I tried it and got problems, is it impossible to do? What’re another options to run several apps with different domains on digital ocean then?

Appreciate your help.

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.

×
Submit an Answer
1 answer

Hello,

Yes, yes this is doable. As you are already using Nginx, you could host multiple applications by adding multiple Nginx server blocks.

For a step by step guide on how to do that, check out this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

Also, here is a quick demo on how to do this with Docker, in your case it would be quite similar, but with your .NET backend service:

Hope that this helps.
Best,
Bobby

by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu 16.04 server.