Open the httpd-vhosts.conf file from the C:/xampp/apacheconf/extra in order to set up new virtual host that can run your CakePHP application. You will have to add the following lines in order to run the application:
<strong>NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot C:/xampp/htdocs/jack
ServerName local.jack.com
<Directory “C:/xampp/htdocs/jack”>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost></strong>
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot C:/xampp/htdocs/xampp
ServerName localhost
<Directory “C:/xampp/htdocs/xampp”>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>```
The httpd-vhosts.conf file will have the aforementioned configuration for virtual host to run CakePHP and other php application. I have decided to choose local.jack.com as the server name, and likewise, we will have to add it to the C:/Windows/System32/drivers/etchosts file as mentioned below:
# localhost name resolution is handled within DNS itself.
127.0.0.1 localhost
127.0.0.1 local.jack.com
# ::1 localhost
If your web server is already running, restart it so that you can access the new CakePHP installation by growing to http://local.jack.com through your browser.
Link : https://www.cometchat.com/blog/setup-cakephp-using-xampp-on-windows