Wednesday, January 26, 2011

Symfony on Appserv

Page 1 :

Appserv 2.5.10's Apache is not configured yet to serve fake domain/subdomains (or virtual hosts). I chose '' as my fake domain.

The first thing we need to do, is to enable the vhost_alias_module in our Apache configuration file. To do this, we need to open the httpd.conf file located in C:\AppServ\Apache2.2\conf.

Uncomment this line removing sharp (#) :

LoadModule vhost_alias_module module/

Include conf/extra/httpd-vhosts.conf

In conf/extra/httpd-vhosts.conf file:

  DocumentRoot "C:\AppServ\www\symfony\jobeet\web"
  DirectoryIndex index.php
  <Directory "C:\AppServ\www\symfony\jobeet\web">
    AllowOverride All
    Allow from All

  Alias /sf "C:\AppServ\www\symfony\jobeet\lib\vendor\symfony\data\web\sf"
  <Directory "C:\AppServ\www\symfony\jobeet\lib\vendor\symfony\data\web\sf">
    AllowOverride All
    Allow from All

The domain name used in the Apache configuration has to be declared locally. I have added the following line:

in my C:\WINDOWS\system32\drivers\etc\host file.

Then I restarted my Apache server. To do that,
  • Right-click C:\AppServ\Apache2.2\bin\httpd.exe
  • Click "Run as Administrator"
Test in your browser.

No comments:

Post a Comment