I have successfully configured one host added
- Code: Select all
<VirtualHost *:80>
ServerAdmin admin@kambinator.myftp.biz
DocumentRoot "C:/xampp/htdocs/prestashop/"
ServerName magazin.myftp.biz
ServerAlias www.magazin.myftp.biz
ErrorLog "magazin.log"
CustomLog "magazin.log" combined
</VirtualHost>
into C:\xampp\apache\conf\extra\httpd-vhosts.conf all workes fine!
I added another folder to C:\xampp\htdocs for example a folder with a simple index.html file (therefore i'm trying to install joomla)
added another host
- Code: Select all
<VirtualHost *:80>
ServerAdmin admin@kambinator.myftp.biz
DocumentRoot "C:/xampp/htdocs/mysite/"
ServerName kambinator.myftp.biz
ServerAlias www.kambinator.myftp.biz
ErrorLog "kambinator.log"
CustomLog "kambinator.log" combined
</VirtualHost>
into C:\xampp\apache\conf\extra\httpd-vhosts.conf (after the first one)
Saved the file and restarted apache
if i write in my browser kambinator.myftp.biz it goes to the first host (magazin.myftp.biz) and if i write magazin.myftp.biz it also goes to magazin.myftp.biz
If i change the hosts places in C:\xampp\apache\conf\extra\httpd-vhosts.conf like this:
- Code: Select all
<VirtualHost *:80>
ServerAdmin admin@kambinator.myftp.biz
DocumentRoot "C:/xampp/htdocs/mysite/"
ServerName kambinator.myftp.biz
ServerAlias www.kambinator.myftp.biz
ErrorLog "magazin.log"
CustomLog "magazin.log" combined
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@kambinator.myftp.biz
DocumentRoot "C:/xampp/htdocs/prestashop/"
ServerAlias www.magazin.myftp.biz
ErrorLog "magazin.log"
CustomLog "magazin.log" combined
</VirtualHost>
just change their places (put the second into first's place) and try to access in browser kambinator.myftp.biz or magazin.myftp.biz both lead me to the first vhost content
So only the first one works (both lead to the first host)
HOW CAN I MAKE THEM WORK BOTH AT THE SAME TIME? Separately they work fine both
PS: I use dns from no-ip.org and run NO-IP DUC all seems to work fine