- Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/xampp/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName kambinator.myftp.biz
ServerAlias www.kambinator.myftp.biz
DocumentRoot "C:/xampp/htdocs/mysite"
ServerAdmin admin@kambinator.myftp.biz
ErrorLog "magazin.log"
CustomLog "magazin.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerName magazin.myftp.biz
ServerAlias www.magazin.myftp.biz
DocumentRoot "C:/xampp/htdocs/prestashop"
ServerAdmin admin@kambinator.myftp.biz
ErrorLog "magazin.log"
CustomLog "magazin.log" combined
</VirtualHost>
Save the file and restart Apache.
If Apache can't start read the C:\xampp\apache\logs\error.log file.
The first vhost will always be served by default unless the httpd-vhosts.conf file is in the correct format and all directives are included.
Make sure in your Windows hosts file (C:\Windows\system32\drivers\etc\HOSTS) you have the first line after the comments
- Code: Select all
127.0.0.1 localhost
IMPORTANT SECURITY TIP:
Make sure in XAMPP 1.7.4 you have secured the C:\xampp\webdav folder if you intend to allow access from the Internet - the link in my signature will help.
Good luck.
![Smile :)](./images/smilies/icon_smile.gif)