Configure multiple domain names for the same apache ip address and multiple virtual hosts for the same Apache IP Address

Source: Internet
Author: User

APACHE configures multiple domain names with the same IP address, so you should be familiar with web development. However, let's make a summary to avoid forgetting this in the future!
The following describes how to perform the operation:
1. install APACHE under windows2003 to configure the virtual directory, which is basically the same as that in UNIN. It is to modify the httpd. conf file (Apache2 \ conf \ httpd. conf ).
2. Open the http. conf file and enter

NameVirtualHost 218.17.19.19 # The Server IP address <VirtualHost 218.17.19.19> # the IP address the domain name directs to DocumentRoot "E:/webroot/phpernote" # the directory to which the domain name directs, note "" ServerName www.phpernote.com # The website domain name DirectoryIndex. php index.html default. php index.html. var </VirtualHost> <VirtualHost 218.17.19.19> # IP address of the second website domain name DocumentRoot "E:/webroot/example" # ServerName www. example. comDirectoryIndex index. php index.htm index.html default. php index.html. var </VirtualHost>

More virtual hosts (Domain Name configuration) and so on.

Articles you may be interested in
  • PHP allows multiple second-level domain names on the same server to share SESSION data
  • Windows cannot start the hardware device because its configuration information (in the Registry) is incomplete or damaged. (Code 19) Solution
  • How to Use xampp to build a php VM
  • Js determines whether a value exists in a js Array
  • Php converts multiple consecutive spaces in a string into one.
  • No matter how much you earn, you will always have different troubles.
  • Shoulder, back muscle group exercise-Bring Up-bend up rowing-Move up-Stand Up-Stand up weight bend up-Sit posture neck pull down-bend upright hold up-neck front wide hold up
  • Php clears (deletes) the files in the specified directory, and does not delete the directory folder.

Related Article

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.