apache配置虚拟目录与虚拟主机.docVIP

  • 1
  • 0
  • 约1.71万字
  • 约 5页
  • 2017-08-03 发布于河南
  • 举报
apache配置虚拟目录和虚拟主机 配置虚拟主机如下步骤: 1.在apache目录文件下的配置文件conf下找到 httpd.conf 例子路径如下:D:\Apache\conf 2.打开 httpd.conf文本,找到如下代码: 将 Virtual hosts 下面的代码: # Virtual hosts #Include conf/extra/httpd-vhosts.conf 把前面的#注销掉。 修改后如图下: 3.假设我们的虚拟主机在e盘 E:\test\myblog 4.设置http-vhosts.conf 代码如下: VirtualHost *:80 ServerAdmin HYPERLINK mailto:webmaster@ webmaster@ # DocumentRoot 是网站文件存放的根目录 DocumentRoot E:/test/myblog #这里配置欢迎首页面 DirectoryIndex news.html index.html index.htm index.php #ServerName 是网站域名。需要跟DNS指向的域名一致 ServerName ErrorLog logs/-error.log CustomLog logs/-access.log common /VirtualHost 图如下:

文档评论(0)

1亿VIP精品文档

相关文档