Question

How to deploy multiple web sites on same domain

I have a single web site deployed to my Digital Ocean droplet. The droplet has its own domain name, https connection and certificate. I would like to add 2 more web sites to this domain, but I cannot get the server to run them. I tried using domain-name.dom/directory-of-2nd-site/index.html but no luck. Just a 404 message.

What do I need to do / what do I need to research?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @dcolhoun57,

First, I’ll recommend creating the other two websites on a subdomain rather add multiple websites under one domain.

Having said that, can you let me know what WebService you are using? Is it Nginx or Apache and can you show me the configuration you have for your domain?

If you are not sure if you are using Apache or Nginx, you can find out by typing the following :

nestat -tulpen

See on port 80 and 443, what does it say it run on it?

Anyway, if it’s Apache you can find the configuration of your domain in /etc/apache2/sites-enabled. If it’s Nginx, you can find the configuration in : /etc/nginx/sites-enabled