首页 > 代码库 > 配置虚拟主机时遇到的问题
配置虚拟主机时遇到的问题
添加虚拟主机的配置后,始终apache服务启动不成功
后来在网上查到需要注释掉http.conf默认的配置DocumentRoot
#DocumentRoot "C:/wamp64/www/",注释掉这行就重启成功了。
下面的注释放开
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
并在httpd-vhosts.conf文件中添加
#配置我们自己的虚拟主机
<VirtualHost 127.0.0.100:80>
#配置访问根目录
DocumentRoot "e:/www/cehome"
ServerName www.test.com
#这里配置欢迎首页面
DirectoryIndex index.html index.htm index.php
<Directory "e:/www/cehome">
Options FollowSymLinks
#不允许别人修改我们的页面
AllowOverride None
#设置访问权限
Order allow,deny
Allow from All
</Directory>
</VirtualHost>
配置虚拟主机时遇到的问题
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。