Problem with Virtual host.
Dear all,
Hi, I have download XAMPP and install it on c:\xampp.
I found htdocs is the document root. But I want to change it to c:\XAMPP\web (for some reason), while then I try to keep c:\xampp\htdocs folder in another virtual host.
So the system like this :
if user type http://localhost, it will open c:\xampp\web as doc root
if user type http://xampp, it will open c:\xampp\xampp
I try to use name based virtual host but Failed. Then I try to use IP based virtual host it's a little work. The code like this :
############################
# I have modified this one #
DocumentRoot "C:/xampp/www"
<Directory "C:/xampp/www">
...blablabla
</DiRECtory>
############################
# added this one #
<VirtualHost 127.0.0.1:80>
DocumentRoot C:/xampp/www
ServerName localhost
ServerAdmin localhost@localhost.com
ErrorLog logs/localhost.log
CustomLog logs/localhost.log common
</VirtualHost>
<VirtualHost 127.0.0.2:80>
DocumentRoot C:/xampp/htdocs
ServerName xampp
ServerAdmin xampp@xampp.com
ErrorLog logs/xampp.log
CustomLog logs/xampp_custom.log common
</VirtualHost>
if I type http://127.0.0.1 or 127.0.0.2 the apache respon good, but if I type http://xampp there are nothing happen????
For name based virtual host, I try to add this :
#NameVirtualHost *:80
#<VirtualHost *:80>
# DocumentRoot C:/xampp/www
# ServerName localhost
# ServerAdmin localhost@localhost.com
# ErrorLog logs/localhost.log
# CustomLog logs/localhost.log common
#</VirtualHost>
#<VirtualHost *:80>
# DocumentRoot C:/xampp/htdocs
# ServerName xampp
# ServerAdmin xampp@xampp.com
# ErrorLog logs/xampp.log
# CustomLog logs/xampp_custom.log common
#</VirtualHost>
But doesn't work. The apache only respon if I type : http://localhost, but not respond if I type http://xampp/ it doesn't
SSL is creating a new virtual host too, so I made another virtual host. Only change servername and docroot