hmxaijing

php中配置虚拟主机

在httpd.conf 文件中启用 httpd-vhosts.conf
就是把#注销掉
# Virtual hosts ,虚拟主机
Include conf/extra/httpd-vhosts.conf


假设我们的虚拟主机在 f:/myweb 盘 [该站点,事先有]
设置http-vhosts.conf文件
#配置我们自己的虚拟主机
<VirtualHost127.0.0.1:80>
DocumentRoot "d:/myblog"
#这里配置欢迎首页面
DirectoryIndex index.html index.htmindex.php
<Directory />
Options FollowSymLinks
#不许可别人修改我们的页面
AllowOverride None
#设置访问权限
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
4. 在hosts文件中添加我们的ip 和主机映射关系

c:/windows/system32/drivers/etc/hosts

127.0.0.1 www.sohu.cn
要求大家掌握:
1. 通过案例你要清楚访问一个页面(HTML/PHP) 详细流程
2. 能够配置虚拟主机

发表于 2014-07-17 11:55  tiger huang  阅读(246)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-08-20
  • 2021-11-23
  • 2022-01-13
猜你喜欢
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案