【发布时间】:2011-02-06 17:27:04
【问题描述】:
我开始学习 symfony for php 框架,但我遇到了 httpd.conf 配置问题。
首先,我在我的 windows c:\xampplite\
上安装了 xampplite然后我创建了一个 symfony 项目(如入门指南中所述) c:\xampplite\htdocs\symfonytest\
当我尝试访问 http://localhost/symfonytest/web/ 时一切正常 (所有图标和文字都显示得很好)
现在我要配置 httpd.conf 并输入如下内容:
<VirtualHost 127.0.0.1/symfonytest>
DocumentRoot "c:\xampplite\htdocs\symfonytest\web"
DirectoryIndex index.php
<Directory "c:\xampplite\htdocs\symfonytest\web">
AllowOverride All
Allow from All
</Directory>
Alias /sf c:\xampplite\htdocs\symfonytest\web\sf
<Directory "c:\xampplite\htdocs\symfonytest\web\sf">
AllowOverride All
Allow from All
</Directory>
但它根本没有效果......当我输入 http://127.0.0.1/symfonytest/ 它仍然显示我的 c:\xampplite\htdocs\symfonytest\ 的目录列表
如何解决这个 httpd.conf 问题?
谢谢!!!
【问题讨论】:
-
如果您尝试设置基于名称的虚拟主机,那么我认为您需要阅读文档。如果你不是,那么你需要解释你想要做什么。
-
我尝试将来自localhost/symfonytest 的所有请求“重定向”到 localhost/symfonytest/web/index.php (同时对用户隐藏 conf/)
标签: php apache symfony1 httpd.conf