Virtual host is There two categories.
1. IP-Base Virtual Host
Virtual host like this. All servers must have a different IP Address can be done by machines that do virtual post should have more than one network card. that is the first card is 1 IP Address, or if there is only one card only. We can do virtual IP on the card the same time. But for this method to check whether the operating system supports viewed or not.
2. Name-Base Virtual Host
Virtual Hosts Another option is what the name server differently but IP Address the same where we use DNS to help is defined in DNS, each host server, pointing to the IP Address the same after that it will adjust the Aphache Web Server on each host to manage again.
To make a virtual host IP-Base Virturl Host.
Of a virtual host in ubuntu to create files in a virtual host by creating that directory.
/etc/apache2/sites-available. And the name of Virtual host.
/etc/apache2/site-available/NameVirtualHost
Samples used to create the virtual host is different.
EX 1 : This example, a server machine has two IP Address is 203.10.103.22 and 203.10.103.44. Which referred to name. ubuntu.zoo.co.th and www.ubuntu.com. By the machine. ubuntu.zoo.com have been made CNAME to a Host name www.ortherubuntu.co.th it if we want the client to use both web server through the URL http://www.ubuntu.co.th. And www.ortherubuntu.co.th
EX 2 : This example, a server machine has two IP Address is 203.10.103.22 and 203.10.103.55. Which referred to name. zoo.ubuntu.co.th and cache.ubuntu.co.th by the Host name www.ubuntu.co.th a CNAME to point to zoo.ubuntu.co.th. The main server cache.ubuntu.co.th. Is used as a proxy cache that uses port 80.
To make a virtual host Name-Base Virturl Host.
EX 1 : Server is a single IP Address 203.10.103.22. Compared with the host name ubuntu.zoo.co.th the host name has a nickname with a CNAME to www.zoo.co.th with ortherzoo.co.th. In the example, want to use the web through two nicknames. The host name is considered both as a separate machine.
EX 2 : Single IP Address but the server supports multiple domains and multiple port by port can be specified through the NameVirtualHost.
Translation by : Google Translation
1. IP-Base Virtual Host
Virtual host like this. All servers must have a different IP Address can be done by machines that do virtual post should have more than one network card. that is the first card is 1 IP Address, or if there is only one card only. We can do virtual IP on the card the same time. But for this method to check whether the operating system supports viewed or not.
2. Name-Base Virtual Host
Virtual Hosts Another option is what the name server differently but IP Address the same where we use DNS to help is defined in DNS, each host server, pointing to the IP Address the same after that it will adjust the Aphache Web Server on each host to manage again.
To make a virtual host IP-Base Virturl Host.
Of a virtual host in ubuntu to create files in a virtual host by creating that directory.
/etc/apache2/sites-available. And the name of Virtual host.
/etc/apache2/site-available/NameVirtualHost
Samples used to create the virtual host is different.
EX 1 : This example, a server machine has two IP Address is 203.10.103.22 and 203.10.103.44. Which referred to name. ubuntu.zoo.co.th and www.ubuntu.com. By the machine. ubuntu.zoo.com have been made CNAME to a Host name www.ortherubuntu.co.th it if we want the client to use both web server through the URL http://www.ubuntu.co.th. And www.ortherubuntu.co.th
Listen 80 ServerName ubuntu.zoo.co.th <VirtualHost 203.10.103.22> DocumentRoot /www/ubuntu_web ServerName www.ubuntu.co.th .... </VirtualHost> <VirtualHost 203.10.103.44> DocumentRoot /www/ortherubuntu_web ServerName www.ortherubuntu.co.th .... </VirtualHost> |
EX 2 : This example, a server machine has two IP Address is 203.10.103.22 and 203.10.103.55. Which referred to name. zoo.ubuntu.co.th and cache.ubuntu.co.th by the Host name www.ubuntu.co.th a CNAME to point to zoo.ubuntu.co.th. The main server cache.ubuntu.co.th. Is used as a proxy cache that uses port 80.
Listen 203.10.103.22:80 Listen 203.10.103.55:8080 ServerName zoo.ubuntu.co.th <VirtualHost 203.10.103.22:80> DocumentRoot /www/ubuntu_web ServerName www.ubuntu.co.th .... </VirtualHost> <VirtualHost 203.10.103.55:8080> ServerName cache.ubuntu.co.th ... <Directory proxy> Order Deny,Allow Deny from all Allow from 203.10.103 /Directory> </VirtualHost> |
To make a virtual host Name-Base Virturl Host.
EX 1 : Server is a single IP Address 203.10.103.22. Compared with the host name ubuntu.zoo.co.th the host name has a nickname with a CNAME to www.zoo.co.th with ortherzoo.co.th. In the example, want to use the web through two nicknames. The host name is considered both as a separate machine.
Listen 80 ServerName ubuntu.zoo.co.th NameVirtualHost 203.10.103.22 <VirtualHost 203.10.103.22> DocumentRoot /www/zoo_web ServerName www.zoo.co.th .... </VirtualHost> <VirtualHost 203.10.103.22> DocumentRoot /www/orther_web ServerName www.ortherzoo.co.th .... </VirtualHost> |
EX 2 : Single IP Address but the server supports multiple domains and multiple port by port can be specified through the NameVirtualHost.
NameVirtualHost 203.10.103.22:80 NameVirtualHost 203.10.103.22:8080 <VirtualHost 203.10.103.22:80> DocumentRoot /www/zoo1_web ServerName www.zoo1.co.th </VirtualHost> <VirtualHost 203.10.103.22:8080> DocumentRoot /www/zoo2_web ServerName www.zoo2.co.th </VirtualHost> <VirtualHost 203.10.103.22:80> DocumentRoot /www/zoo3_web ServerName www.zoo3.co.th </VirtualHost> <VirtualHost 203.10.103.22:8080> DocumentRoot /www/zoo4_web ServerName www.zoo4.co.th </VirtualHost> |
Translation by : Google Translation
ความคิดเห็น