开发者

How to configure symfony when using apache

Please help, how do I configure apache (wamp) in windows when I want to use symfony as my php framework, I followed the guide(pdf) from the symfony site. But I end up with this when I access http://127.0.0.1:8080/:

How to configure symfony when using apache

But I end up with this, when I try to access http://localhost/sfproject/web/frontend_dev.php

How to configure symfony when using apache

What is the correct url to access when I want to start using symfony?

I installed symfony on:

C:\dev\sfproject\lib\vendor\symfony

And the projects are in:

D:\Programs\wamp\www\开发者_开发问答sfproject

I added the lines below on my httpd.conf. I've done it by left clicking the wampserver tray icon->apache->httpd.conf I got the code below from the pdf file, and just modify it to match the directory.

#Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080

#This is the configuration for your project
Listen 127.0.0.1:8080

<VirtualHost 127.0.0.1:8080>
    DocumentRoot "D:\Programs\wamp\www\sfproject\web"
    DirectoryIndex index.php
    <Directory "D:\Programs\wamp\www\sfproject\web">
      AllowOverride All
      Allow from All

</Directory>

Alias /sf C:\dev\sfproject\lib\vendor\symfony\data\web\sf
<Directory "C:\dev\sfproject\lib\vendor\symfony\data\web\sf">
  AllowOverride All
  Allow from All
</Directory>
</VirtualHost>

I also didn't install symfony using svn. I just copy pasted the downloaded symfony 1.4.zip. Then extracted the contents. It basically looks like this:

How to configure symfony when using apache

Please don't limit your answer to my question, I've just started installing symfony today. So if you have something to tell to a beginner like me, then please do, thanks.


You are getting the correct page! Just missing CSS/Images.

This bit in your config looks wrong:

Alias /sf C:\dev\sfproject\lib\vendor\symfony\data\web\sf
<Directory "C:\dev\sfproject\lib\vendor\symfony\data\web\sf">

Those two directories should match whats in your DocumentRoot i think...

Try

Alias /sf D:\Programs\wamp\www\sfproject\lib\vendor\symfony\data\web\sf
<Directory "D:\Programs\wamp\www\sfproject\lib\vendor\symfony\data\web\sf">

Alternatively:

Copy lib/vendor/symfony/data/web/sf to your web/ folder so that there is a web/sf folder with the same contents as the lib/vendor/symfony/data/web/sf one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜