Construction of Web Hosting - based domain name

Virtual Web Host

1, run multiple Web sites on one physical server, where each site is not independent
occupy a real computer
2, httpd virtual host support type

● based virtual hosting (commonly used by businesses)
● IP-based virtual host address (at least two IP on a host computer, not practical)
●-based virtual host ports

Three types: different IP, different ports, different domain name

Experimental configuration

Open a Linux, a host win7
1, provided dns master profile
Construction of Web Hosting - based domain name
2, profile settings dns area
Construction of Web Hosting - based domain name
3, data area disposed dns profile
(1) to a configuration data content kgc.com.zone
Construction of Web Hosting - based domain name
(2) to kgc02.com .zone configuration data content
Construction of Web Hosting - based domain name
4, add a virtual host configuration in a configuration file httpd
Construction of Web Hosting - based domain name
5, ready access to the virtual host of web documents

[root@www ~]# mkdir -p /var/www/html/kgc
[root@www ~]# mkdir -p /var/www/html/kgc02
[root@www ~]# echo "<h1 > this  kgc  web</h1>" >
/var/www/html/kgc/index.html
[root@www ~]# echo "<h1 > this  is  kgc02  web </h1>" >
/var/www/html/kgc02/index.html

6, httpd primary boot loader configuration file in the virtual host configuration file
Construction of Web Hosting - based domain name
7, off the firewall security features. Start httpd and named service. win 7 access to two domain names, show two different pages.

Construction of Web Hosting - based domain name
Construction of Web Hosting - based domain name

Thanks for watching! !

Guess you like

Origin blog.51cto.com/14475593/2444666