1 00:00:00,900 --> 00:00:06,320 Before we continue it's important to understand what we'll be doing in the next part of this course. 2 00:00:07,220 --> 00:00:13,160 We're now going to be setting up virtual hosts that allow multiple domains to be served from a single 3 00:00:13,160 --> 00:00:13,830 server. 4 00:00:15,120 --> 00:00:25,880 To recap so far we've deployed a droplet installed Aposhian my SU ph P and ph my admin. 5 00:00:25,930 --> 00:00:29,470 So let's go ahead and get started on working with virtual hosts. 6 00:00:30,620 --> 00:00:38,930 It's important to understand that by default a pause she identifies the HD directory in the w w w folder 7 00:00:39,950 --> 00:00:43,810 as the root folder for our web pages. 8 00:00:43,820 --> 00:00:51,360 This means when someone visits our primary web site domain applause she will load the index dot h DML 9 00:00:51,370 --> 00:00:55,390 file located in the DML directory. 10 00:00:55,390 --> 00:01:06,300 Now when I say primary domain what I mean is if you're only hosting one domain on your web server if 11 00:01:06,300 --> 00:01:11,380 your whole hosting multiple domain names then you don't have a primary domain. 12 00:01:13,720 --> 00:01:20,270 Since we will be working with multiple domains each domain will need to point to its own unique directory. 13 00:01:20,710 --> 00:01:29,470 So for example x y z dot com will need to load the default index page from the x y z dot com folder 14 00:01:29,920 --> 00:01:32,190 that we create. 15 00:01:32,240 --> 00:01:36,640 So here is a sample of the directory structure we're going to be creating. 16 00:01:37,540 --> 00:01:44,320 In our w w w folder we're gonna create a directory for each domain name. 17 00:01:44,320 --> 00:01:46,890 So for example if you had two domains. 18 00:01:46,930 --> 00:01:50,380 This is exactly what your directory structure would look like. 19 00:01:51,160 --> 00:01:53,910 The domain name is the folder name. 20 00:01:54,960 --> 00:01:59,430 And then inside that folder we would have another folder called aged. 21 00:01:59,820 --> 00:02:04,470 And inside the HMO folder would be all our Web site files. 22 00:02:06,370 --> 00:02:06,760 OK. 23 00:02:06,800 --> 00:02:10,430 And that's the same if you had a second domain. 24 00:02:10,430 --> 00:02:15,620 That's exactly what it would look like except that the domain name would be different. 25 00:02:15,620 --> 00:02:20,810 So instead of x y z dot com your second domain can be ABC dotcom. 26 00:02:20,840 --> 00:02:26,790 So it's fairly straightforward and you can have 10 20 however many of these as you needed to have. 27 00:02:27,080 --> 00:02:32,780 So if you're running a small hosting company you might have 100 clients where you can set up 100 directories 28 00:02:32,870 --> 00:02:35,450 each with a different domain name. 29 00:02:35,450 --> 00:02:44,170 So this is the first step before we actually go on to creating virtual hosts and we'll see you in the 30 00:02:44,170 --> 00:02:45,040 next lecture.