Download presentation
Presentation is loading. Please wait.
Published byEaster Roberts Modified over 8 years ago
1
Multi-Domain Hosting CPTE 212 “Missing Slides” for 1/22/2015 John Beckett
2
What is DNS? DNS is a global database system built into the Internet that translates hostnames into IP addresses. E.g. –Send “hw.cs.southern.edu” to DNS, and –DNS returns 216.249.119.28
3
How are Web Sites Hosted? In the simple case, each Web site would have its own server with and IP address –Access http://hw.cs.southern.edu and you are sent to 216.249.119.28, which returns the info you neededhttp://hw.cs.southern.edu It is a common practice to have more than one (perhaps hundreds) of Web sites served by a single server. In this case Apache is configured to look at the desired host name in the GET header, and respond with the appropriate Web site materials.
4
Configuring Multi-Domain Service – 1 Preparing Web materials Create an area on the server to hold the Web site. One good way to do this is to create a user, then log into that user and create a special directory for Web materials. jbeckett@ncloud99linux:~$ sudo bash [sudo] password for jbeckett: root@ncloud99linux:~# adduser cormorant Adding user `cormorant'... Adding new group `cormorant' (1002)... Adding new user `cormorant' (1002) with group `cormorant'... Creating home directory `/home/cormorant'... Copying files from `/etc/skel'... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for cormorant Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y root@ncloud99linux:~# cormorant@ncloud99Linux: mkdir public_html cormorant@ncloud99Linux: cd public_html cormorant@ncloud99Linux: nano index.html Now…write some HTML Cormorant Site This is information about Cormorants Save using control-O, get out with Control-X, then exit Linux with a control-D
5
Configuring Multi-Domain Service – 2 Setting up DNS Using a free DNS service, create a host entry pointing to the IP address for your server. Find out your IP address using the command line on any host (such as your personal computer). Log into the DNS registrar using a free account, then click on “Add Host.”
6
Configuring Multi-Domain Service – 3 Configuring Apache Using a free DNS service, create a host entry pointing to the IP address for your server. Log in as root, then create a configuration file in /etc/apache2/sites-available. This file is named cormorant.hopto.org.conf DocumentRoot /home/cormorant/public_html/ ServerName cormorant.hopto.org ServerAdmin webmaster@localhost Options FollowSymLinks AllowOverride None Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted ErrorLog /var/log/apache2/cormorant_error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined The items you’ll need to change are highlighted.
7
Configuring Multi-Domain Service – 4 Installing your configuration Use “sudo bash” to take on root privileges Inform Apache that the new site is to go live the next time Apache is restarted: # a2ensite cormorant.hopto.org Restart Apache # service apache2 reload
8
Configuring Multi-Domain Service – 5 Testing your configuration Use a browser If something is wrong and you fix it, you’ll need to refresh your browser!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.