Apache配置默认主页

时间:2024-10-11 23:02:46

Apache配置域名之后,我们还需要对Apache项目配置一个默认主页作为欢迎界面

工具/原料

Apache2.2

电脑

Apache配置默认主页

1、进入Apache的conf目录

Apache配置默认主页

2、打开httpd.conf文件输入:在文件鹤瞩阚勒末位添加: <Directory "F:/www_php/blo爿讥旌护g_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 hosts3.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如果能正常访问项目主页则成功

© 手抄报圈