APACHE configures multiple domain names with the same IP, and configures multiple virtual hosts with the same IP under Apache_PHP tutorial

WBOY
Release: 2016-07-13 10:31:08
Original
1038 people have browsed it

APACHE configures multiple domain names with the same IP. Those who do web development should be very familiar with it, but I still summarize it to prevent forgetting it in the future!
Let’s just talk about how to operate:
1. When installing APACHE under Windows 2003, the virtual directory configuration is basically the same as under UNIN, which is to modify the httpd.conf file (Apache2confhttpd.conf).
2. Open the http.conf file and enter

at the bottom
NameVirtualHost 218.17.19.19 #服务器IP地址 
<VirtualHost 218.17.19.19> #域名所指向的IP 
DocumentRoot "E:/webroot/phpernote" #域名所指向的目录,注意""不可少 
ServerName www.phpernote.com #网站域名 
DirectoryIndex index.php index.html default.php index.html.var 
</VirtualHost> 

<VirtualHost 218.17.19.19> #第二个网站域名所指向的IP 
DocumentRoot "E:/webroot/example" #www.example.com要指向的目录
ServerName www.example.com
DirectoryIndex index.php index.htm index.html default.php index.html.var 
</VirtualHost>
Copy after login

More virtual hosts (domain name configuration) and so on.

Articles you may be interested in

  • PHP implements multiple second-level domain names on the same server to share SESSION data
  • Because its configuration information (in the registry) is not Either intact or corrupted, Windows cannot start this hardware device. (Code 19) Solution
  • How to use xampp to build a virtual host running php
  • js determines whether a value exists in a js array
  • php Change the string in Convert multiple consecutive spaces into one space
  • No matter how much money you earn, you will always have different worries
  • Shoulder and back muscle group exercises - pull-ups - prone rowing - prone push-ups - standing Bend over and bend with weight - Sitting pull-down behind the neck - Standing prone pull-up - Pull-up with a wide grip in front of the neck
  • How to clear (delete) the files in the specified directory without deleting the directory folder with php

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764129.htmlTechArticleAPACHE configures multiple domain names with the same IP. Those who do web development should be very familiar with it, but I still summarize it to prevent it from happening in the future. Forgot! Let’s just talk about how to operate: 1. Install under windows2003...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!