Question

How To Install tutorial confusing instruction re: creating virtual host your_domain

Hello and thank you for the tutorial on how to create a virtual host in Ubuntu. Unfortunately this sentence causes confusion:

When using the Apache web server, you can create virtual hosts (similar to server blocks in Nginx) to encapsulate configuration details and host more than one domain from a single server. In this guide, we’ll set up a domain called your_domain, but you should replace this with your own domain name.

The instruction are good for explaining that users may need to host more than one domain, yet, when proceding further, the instructions are suggesting to include “your own domain name”. What happened to the idea that more than one domain may find it’s home here??? Now I don’t know if I’m supposed to consider what I’m entering as the data for just one domain, or multiple domains? Totally confusing. As a result, the rest of the steps don’t work for me because they are asking me to enter my domain (as in single domain) even though I was planning on hosting several domains. . .


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.

KFSys
Site Moderator
Site Moderator badge
April 24, 2025

Heya,

Usually, one configuration file is for one domain. So if you want to have multiple domains, you’ll need to repeat the process explained in the tutorial for each domain and if you want only one domain, you’ll need one configuration file.

In the configuration file are configurations ONLY for one domain(the one specified in it).

Hope that helps.

alexdo
Site Moderator
Site Moderator badge
April 24, 2025

Heya, @jeffschips

If you plan to host multiple domains (like example1.com, example2.com, etc.), you’ll simply repeat these steps for each domain—creating a separate virtual host file for each one, with its own configuration and root directory.

Hope that this helps!

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.