Apache配置默认主页

 时间:2026-02-12 00:21:50

1、进入Apache的conf目录

Apache配置默认主页

2、打开httpd.conf文件输入:

在文件末位添加:

   <Directory "F:/www_php/blog_com/my_blog">

      Options  Indexes FollowSymLinks Includes

      AllowOverride None

      Order allow,deny

      Allow from all

      DirectoryIndex blog_index.php default.php index.html 

   </Directory>

3、另一种方法:

3.1:查找# Virtual hosts

3.2:

   将# Include conf/extra/httpd-vhosts.conf前面的“#”去掉

3.3:

  打开Apache目录下Apache2.2\conf\extra\httpd-vhosts.conf文件

3.4:在文件末尾添加

   <Directory "F:/www_php/blog_com/my_blog">

      Options  Indexes FollowSymLinks Includes

      AllowOverride None

      Order allow,deny

      Allow from all

      DirectoryIndex blog_index.php default.php index.html 

   </Directory>

4、重启

1、输入blog.com如果能正常访问项目主页则成功

  • IntelliJ IDEA怎么进行代码对比
  • js如何将字符串截成数组,或者是把数组变字符串
  • 怎样用VBS运行计算器
  • AndroidStudio怎样改变字体
  • Win10怎么修改音量调整条 如何恢复为Win7风格
  • 热门搜索
    手机和电脑怎么连接 银耳怎么煮才会粘稠 醉驾怎么处罚 怎么去虾线 苹果超过200无法下载怎么解决 中通快递怎么样 贺卡怎么写 tcl电视怎么样 转氨酶高怎么调理 怎么注册推特