Apache Virtual Ip,apacheip
Reference http://blog.sina.com.cn/s/blog_5d8ca1e90100hnpv.html
DocumentRoot C:/xampp/htdocs/yiyunmap
ServerName 127.0.0.1:80
DocumentRoot C:/xampp/htdocs/user
ServerName 127.0.0.2:80
Options Indexes followsymlinks MultiViews
AllowOverride All
Order Allow,deny
Allow from all
Options Indexes followsymlinks MultiViews
AllowOverride All
Order Allow,deny
Allow from all
Linux IP address-based virtual host configuration Apache service
Step one: Set the respective IP address for different network cards in the host
# ifconfig Eth0 192.168.149.1
# ifconfig Eth0:1 192.168.149.2
Step two: In the httpd.conf configuration file, set different for each virtual host
The configuration segment
ServerAdmin root@abc.com
Documentroot/www/abc
ServerName www.abc.com
</VirtualHost>
ServerAdmin root@good.com
Documentroot/www/good
ServerName www.good.com
</VirtualHost>
Step three: Create a home page file for a different virtual site
# echo ' Welcome to ABC ' >/www/abc/index.html
# echo ' Welcome to good ' >/www/good/index.html
Step four: Restart the Apache service
# Service httpd Restart
Virtual IP, the company made a apache+tomcat cluster, but if Apache goes down, the cluster will fail, and now it is said to use virtual IP
Apache is mainly the application layer of software, LVS is mainly the network layer and the transport layer of software. Although all can be forwarded, but the positioning is different:
Apache main function or Web service, in the high availability and scalability is relatively weak, and its forwarding function is to extend the implementation of additional functions;
LVS is a Linux kernel-based load balancing system, combined with keepalived, or Heartbeat+ldirectord, or high-availability packages such as Red Hat Piranha, which are professional in terms of load balancing, high availability, and scalability, and are often used in high-concurrency Web services.
http://www.bkjia.com/PHPjc/853718.html www.bkjia.com true http://www.bkjia.com/PHPjc/853718.html techarticle Apache Virtual IP,APACHEIP reference http://blog.sina.com.cn/s/blog_5d8ca1e90100hnpv.html VirtualHost 127.0.0.1:80 DocumentRoot c:/xampp/htdocs/yiyunmap ServerName 127.0.0.1:80/virtu ...