Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My full path to the Symfony installation is: C:\xampp\htdocs\development\sfprojects\jobeet\lib\vendor\symfony, but when I proceed with the installation following the tutorial on symfony's page all my newly created directories are in C:\. I talk about - apps, config, web and so on. I've reached the final stage where I should change the Apache configuration file and get everything done and working but I encounter a problem again. In the official site it's said to add this:

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 "/home/sfprojects/jobeet/web"
  DirectoryIndex index.php
  <Directory "/home/sfprojects/jobeet/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  <Directory "/home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

And change: On Windows, you need to replace the Alias line with something like:

Alias /sf "c:\dev\sfprojects\jobeet\lib\vendor\symfony\data\web\sf"

And /home/sfprojects/jobeet/web

should be replaced with:

c:\dev\sfprojects\jobeet\web

I tried to make this working for my installation using my paths but when I edit the config file I still can't open the start page. So could someone help me with what I should change to make this work for me and also I was thinking of copying the directories from C:\ to my htdocs directory in XAMPP, but I'm not sure if this gonna work and honestly I prefer to stick to the guide and just follow the steps there adjusting them the less I could.

share|improve this question

migrated from stackoverflow.com Jun 25 '11 at 8:14

This question came from our site for professional and enthusiast programmers.

1  
When you say its not working, what happens when you go to http://172.0.0.1:8080? – d.syph.3r May 3 '11 at 7:36
    
I get this : Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. If you think this is a server error, please contact the webmaster. Error 403 – Leron May 3 '11 at 8:02
up vote 1 down vote accepted

Had problems with this too, especially when adding multiple projects. I wouldn't put the project inside the XAMPP folders because XAMPP does some weird stuff. I recommend letting XAMPP be XAMPP and putting your project somewhere else off of your C root.

Here's what works for me in Windows 7 + XAMPP (with multiple vhosts):

NameVirtualHost *

Listen 127.0.0.1:80

<VirtualHost *>
  ServerName local.myproject
  DocumentRoot "C:/development/sfprojects/myproject/web"
  DirectoryIndex index.php
  <Directory "C:/development/sfprojects/myproject/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf "C:/development/sfprojects/myproject/lib/vendor/symfony/data/web/sf"
  <Directory "C:/development/sfprojects/myproject/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

And... HOSTS file:

127.0.0.1  local.myproject

Hope that helps.

share|improve this answer

You have to point the web server to the correct folder: Add all of this to the end of httpd.conf

# 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 "C:\xampp\htdocs\development\sfprojects\jobeet\web"
  DirectoryIndex index.php
  <Directory "/development/sfprojects/jobeet/web">
    AllowOverride All
    Allow from All
  </Directory>

  Alias /sf "C:\xampp\htdocs\development\sfprojects\jobeet\lib\vendor\symfony\data\web\sf"
  <Directory "/development/sfprojects/jobeet/lib/vendor/symfony/data/web/sf">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

Then go to http://~localhost~:8080/ or localhost:8080 to see your Symfony project. You don't have to edit the host file yet.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.