symfony沙箱和虚拟主机

时间:2009-12-05 13:29:08

标签: symfony1

我已经安装了symfony sandbox 1.2并通过修改这样的apache配置创建了一个虚拟主机(遵循这个tut http://www.symfony-project.org/askeet/1_0/en/1但我改编为沙盒目录与他们的tuts不同):

NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
  ServerName askeet
  DocumentRoot "c:/webserver/www/sf_sandbox/web"
  DirectoryIndex index.php
  Alias /sf "c:/webserver/www/sf_sandbox/web/images/sf"
  <Directory "c:/webserver/www/sf_sandbox/web">
   AllowOverride All
   Allow from All
  </Directory>
  <Directory "c:/webserver/www/sf_sandbox/web/images/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

并修改了我的hosts文件以将askeet映射到127.0.0.1

除了symfony告诉我:

  

如果您在此页面中看不到任何图片,则表示您   可能需要配置您的Web服务器   这样它就可以访问了   symfony_data / web / sf / directory。

实际上我看不到存储在c:/ webserver / sf_sandbox / web / images / sf中的任何图像和我的symfony沙箱,为什么?

1 个答案:

答案 0 :(得分:1)

您的主机文件应为

<VirtualHost 127.0.0.1:80>
  ServerName askeet
  DocumentRoot "c:/webserver/www/sf_sandbox/web"
  DirectoryIndex index.php
  Alias /sf "c:/webserver/www/sf_sandbox/web/sf"
  <Directory "c:/webserver/www/sf_sandbox/web">
   AllowOverride All
   Allow from All
  </Directory>
  <Directory "c:/webserver/www/sf_sandbox/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

因为sf目录在web /目录中而不在web / images目录中?