Report this

What is the reason for this report?

How to deploy multiple web sites on same domain

Posted on September 29, 2021

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?



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.