Vhosts setup in apache2.2 and 2.4

Last night i upgrade my apache 2.2 to 2.4. After that all of my vhosts settings are not working anymore. The syntax has changed abit in directory permission.

In apache 2.2, you can set any name. But in 2.4, your vhost should be end with .conf

Here is the example of vhost syntax for each. Just taking note my experience and for more details should read the apache official site http://httpd.apache.org/docs/

Apache 2.2

<VirtualHost *:80>
   ServerAdmin admin@winminsoe.me
   ServerName alice.com.sg
   SetEnv APPLICATION_ENV dev

   DocumentRoot /home/winn/www/shopsg/alice/public
   <Directory /home/winn/www/shopsg/alice/public>
       Order allow,deny
       Allow from all
       AllowOverride All
   </Directory>
</VirtualHost>

Apache 2.4

<VirtualHost *:80>
   ServerAdmin admin@winminsoe.me
   ServerName alice.com.sg
   SetEnv APPLICATION_ENV dev

   DocumentRoot /home/winn/www/shopsg/alice/public
   <Directory /home/winn/www/shopsg/alice/public>
       Require all granted
   </Directory>
</VirtualHost>