Reliable and cheap hosting

How to Set Up Linux Apache Server

Chapter 18: Set Up Your First Virtual Host (Part 1)


If all the above testing is passed, it means that your Apache Webserver is working normally. Now, the important moment come. You have to set up your first virtual host in your webserver.

This is suggested that all virtual account should be created under the /var/www/html directory.

In Chapter 7, you have registered a new domain (YourDomain.com). We will use this domain as an example. We will create the first Virtual Account of your new domain (YourDomain.com) under the /var/www/html directory. Okay! Let's start.

1. Create a new directory for the Virtual Account

Open a command window. Move to the home directory: cd /var/www/html Create a new directory (yourdomain) for the virtual account. mkdir yourdomain Move to yourdomain directory cd /yourdomain Create a public_html directory for yourdomain virtual account. mkdir public_html I am sure you are familiar with this public_html directory. All webpages of yourdomain Virtual Account must be saved in the public_html directory.

2. Prepare a Homepage

Prepare a homepage with the file name index.html. Save the homepage inside the /var/www/html/yourdomain/public_html

 

Training Center
Web Hosting
 
Copyright © 2000 MyGreatName