Apache 服务器中如何配置虚拟主机

在apache服务器中如何建立多个网站,并且绑定不同的目录呢?

其实是非常简单的事情在服务器中找到httpd.conf,这个是apache的配置文件。文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/basic/apache-config-virtualhost/

假设我的域名www.selmy.org我绑定的目录是/var/www/docs/selmys/文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/basic/apache-config-virtualhost/

查找:httpd.conf

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/basic/apache-config-virtualhost/

然后编辑httpd.conf,增加如下内容:


我的另外一个网站假设是www.baidu.com文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/basic/apache-config-virtualhost/

那么

文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/basic/apache-config-virtualhost/

申明:转载于网络,版权归原作者所有!文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/basic/apache-config-virtualhost/ 文 章 源 自 note.t4x.orgByrd's Blog-https://note.t4x.org/basic/apache-config-virtualhost/

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!

On this day in past years
March
10
 
Byrd
  • by Published onMarch 10, 2014
  • 原文链接:https://note.t4x.org/basic/apache-config-virtualhost/
匿名

Comment

Anonymous

Slide puzzle verification.