Wednesday, January 26, 2011

Symfony on Appserv

Page 1 : http://www.symfony-project.org/jobeet/1_4/Doctrine/en/01

Appserv 2.5.10's Apache is not configured yet to serve fake domain/subdomains (or virtual hosts). I chose 'jobeety.com' 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/mod_vhost_alias.so
and

Include conf/extra/httpd-vhosts.conf

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

<VirtualHost 127.0.0.1:8080>
  DocumentRoot "C:\AppServ\www\symfony\jobeet\web"
  ServerName jobeety.com
  ServerAlias www.jobeety.com
  DirectoryIndex index.php
  <Directory "C:\AppServ\www\symfony\jobeet\web">
    AllowOverride All
    Allow from All
  </Directory>

  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
  </Directory>
</VirtualHost>


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

127.0.0.1 jobeety.com

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 http://jobeety.com in your browser.

No comments:

Post a Comment