Cannot figure out how to define Vhosts
Posted: 26. July 2004 06:44
Hi,
I want to move several sites I have to my new sever which has XAMPP installed.
I want to have these six sites namebased virtual hosts. I have them set up successfully on the other server, but simply transferring the virtusl hosts code from the old httpd.conf to the new just messes everything up.
Here is what I WISH I could do.
1) Keep localhost private so that only I can use phpmyadmin and it is NOT accessible from outside when someone accesses the server via port 80
2) Define my VirtualHosts so that I can have them on a separate partition. e.g. d:\ftproot
Here is the VHOSTS section of Httpd.conf
And another problem...
3) Also, whenever I try to give my server a name other than localhost, the localhost itself becomes useless (blank page). I don't understand that since my old server has a name (not localhost) and I can still access it with http:\\localhost.
Well, the avatar says it all. I am new to XAMPP. Any help is appreciated.
Steed
I want to move several sites I have to my new sever which has XAMPP installed.
I want to have these six sites namebased virtual hosts. I have them set up successfully on the other server, but simply transferring the virtusl hosts code from the old httpd.conf to the new just messes everything up.
Here is what I WISH I could do.
1) Keep localhost private so that only I can use phpmyadmin and it is NOT accessible from outside when someone accesses the server via port 80
2) Define my VirtualHosts so that I can have them on a separate partition. e.g. d:\ftproot
Here is the VHOSTS section of Httpd.conf
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#<VirtualHost *:80>
# ServerName www.domain1.com
# ServerAdmin admin@domain1.com
# DocumentRoot "D:/ftproot/domain1/htdocs"
# ServerAlias domain1.com *.domain1.com domain1.dyndns.org *.domain1.dyndns.org
#</VirtualHost>
<VirtualHost *:80>
ServerName forums.domain2.com
ServerAdmin admin@cdomain2.com
DocumentRoot "D:/ftproot/domain2/htdocs/forums"
ServerAlias forums.domain2.com forums.domain2.dyndns.org
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain2.com
ServerAdmin admin@domain2.com
DocumentRoot "D:/ftproot/domain2/htdocs"
ServerAlias domain2.com domain2.dyndns.org
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain3.com
ServerAdmin admin@domain3.com
DocumentRoot "D:/ftproot/domain3.com/htdocs"
ServerAlias domain3.com *.domain3.com domain3.dyndns.org *.domain3.dyndns.org
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain4.com
ServerAdmin admin@domain4.com
DocumentRoot "D:/ftproot/domain4/htdocs"
ServerAlias domain4.com *.domain4.com domain4.dyndns.org *.domain4.dyndns.org
</VirtualHost>
<VirtualHost *:80>
ServerName www.domain5.com
ServerAlias domain5.com *.domain5.com domain5.dyndns.org *.domain5.dyndns.org
ServerAdmin admin@domain5.com
DocumentRoot "D:/ftproot/domain5/htdocs"
</VirtualHost>
And another problem...
3) Also, whenever I try to give my server a name other than localhost, the localhost itself becomes useless (blank page). I don't understand that since my old server has a name (not localhost) and I can still access it with http:\\localhost.
Well, the avatar says it all. I am new to XAMPP. Any help is appreciated.
Steed