Heim  >  Artikel  >  Backend-Entwicklung  >  APACHE同一IP配置多个域名,Apache下同一个IP配置多个虚拟主机_PHP教程

APACHE同一IP配置多个域名,Apache下同一个IP配置多个虚拟主机_PHP教程

WBOY
WBOYOriginal
2016-07-13 10:31:081039Durchsuche

APACHE同一IP配置多个域名,做web开发的应该非常熟悉了,不过还是总结一下防止以后搞忘了!
下面直接说该如何操作吧:
1.在windows2003下安装APACHE配置虚拟目录和UNIN下基本是一样的,就是修改httpd.conf文件(Apache2\conf\httpd.conf).
2.打开http.conf文件,在其最下发输入

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

<virtualhost> #第二个网站域名所指向的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>

更多个虚拟主机(域名配置)依次类推。

您可能感兴趣的文章

  • PHP实现同服务器多个二级域名共享 SESSION 数据
  • 由于其配置信息(注册表中的)不完整或已损坏,Windows 无法启动这个硬件设备。 (代码 19)解决办法
  • 如何使用xampp搭建运行php的虚拟主机
  • js判断一个值是否存在于一个js数组中
  • php 将字符串中的连续多个空格转换为一个空格
  • 不管你挣多少钱永远都会有不同的烦恼
  • 肩,背部肌群锻炼-引体向上-俯立划船-俯卧挺身-站姿负重俯身弯起-坐姿颈后下拉-俯立正握上拉-颈前宽握引体向上
  • php清空(删除)指定目录下的文件,不删除目录文件夹的方法

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/764129.htmlTechArticleAPACHE同一IP配置多个域名,做web开发的应该非常熟悉了,不过还是总结一下防止以后搞忘了! 下面直接说该如何操作吧: 1.在windows2003下安...
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn