httpd.conf
files and two httpd-vhosts.conf
files so you need to modify the right ones. Don't forget to include
DirectoryIndex index.php
line in your virtual hosts 'cause some frameworks will not work without it. This is ideal for development environments such as Magento that requires a dot in URL. The only modification you need to make in
httpd.conf
file is to uncomment line that defines file for virtual hosts. See code below.
File: c:\xampp\apache\conf\httpd.conf
... # Virtual hosts Include "conf/extra/httpd-vhosts.conf" ...File: c:\WINDOWS\system32\drivers\etc\hosts
127.0.0.1 localhost 127.0.0.1 cakephp2.local 127.0.0.1 cakephp12.local 127.0.0.1 zend.localFile: c:\xampp\apache\conf\extra\httpd-vhosts.conf
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot c:/xampp/htdocs ServerName localhost ErrorLog "logs/error.log" CustomLog "logs/access.log" combined </VirtualHost> <VirtualHost *:80> DocumentRoot c:/xampp/htdocs/cakephp2/app/webroot ServerName cakephp2.local DirectoryIndex index.php ErrorLog "logs/c2error.log" CustomLog "logs/c2access.log" combined </VirtualHost> <VirtualHost *:80> DocumentRoot c:/xampp/htdocs/cakephp12/app/webroot ServerName cakephp12.local DirectoryIndex index.php ErrorLog "logs/c12error.log" CustomLog "logs/c12access.log" combined </VirtualHost> <VirtualHost *:80> DocumentRoot c:/xampp/htdocs/zend/public ServerName zend.local DirectoryIndex index.php ErrorLog "logs/zerror.log" CustomLog "logs/zaccess.log" combined </VirtualHost>Separating error and access logs is also good idea. Place virtual host directories inside localhost's directory.
No comments:
Post a Comment