Php 关于httpd.conf
我开始学习SymfonyforPHP框架,但在httpd.conf配置方面遇到了问题 首先,我的windows c:\xamplite上安装了xamplite\ 然后我创建了一个symfony项目(如《入门指南》中所述) c:\xamplite\htdocs\symfonytest\ 当我尝试访问时,一切正常 (所有图标和文本都显示得很好) 现在,我需要配置httpd.conf,并键入如下内容:Php 关于httpd.conf,php,apache,symfony1,httpd.conf,Php,Apache,Symfony1,Httpd.conf,我开始学习SymfonyforPHP框架,但在httpd.conf配置方面遇到了问题 首先,我的windows c:\xamplite上安装了xamplite\ 然后我创建了一个symfony项目(如《入门指南》中所述) c:\xamplite\htdocs\symfonytest\ 当我尝试访问时,一切正常 (所有图标和文本都显示得很好) 现在,我需要配置httpd.conf,并键入如下内容: <VirtualHost 127.0.0.1/symfonytest> Document
<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>
DocumentRoot“c:\xamplite\htdocs\symfonytest\web”
DirectoryIndex.php
允许超越所有
通融
别名/sf c:\xamplite\htdocs\symfonytest\web\sf
允许超越所有
通融
但它没有任何效果。。。当我键入时,它仍然显示我的c:\xamplite\htdocs\symfonytest的目录列表\
如何解决这个httpd.conf问题
谢谢你 使用虚拟主机无法做到这一点。请改用别名:
Alias /symphonytest/ "c:\xampplite\htdocs\symfonytest\web"
<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>
Alias/symphonytest/“c:\xamplite\htdocs\symfonytest\web”
允许超越所有
通融
别名/sf/c:\xamplite\htdocs\symfonytest\web\sf
允许超越所有
通融
这应该按照您的预期工作。如果您试图设置基于名称的虚拟主机,那么我认为您需要阅读文档。如果您没有,那么您需要解释您正在尝试做什么。我尝试将所有请求从“重定向”到localhost/symfonytest/web/index.php(同时对用户隐藏conf/)