Apache Virtual ip,apacheip_php Tutorial

Source: Internet
Author: User

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.