PDA

View Full Version : Virtual Domain Not Working.


dayjahone
2nd July 2007, 22:16
I set up the server using mail.mydomain.com. I set up one site, mydomain.com. When you go to mydomain.com, however it goes to the directory of the /var/www, which I don't think people should even see. Can anyone tell me where is went wrong? Thanks.

till
3rd July 2007, 12:32
You selected the wrong IP address for the website. If your server is behind a router, you must use the internal IP address. Also make sure that you access the site by its domain name and not IP address.

dayjahone
3rd July 2007, 15:44
I may have entered the wrong IP at the very end of the ISPConfig setup. Is there a way to change that? ISPConfig, management > settings > IP Address is the internal IP and there are no other IP addresses in the IP List. It is also correct in /etc/network/interfaces and /etc/hosts

root@mail:~# vim /etc/network/interfaces


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.16.10.8
netmask 255.255.255.0
gateway 172.16.10.1

~
~

root@mail:~# vim /etc/hosts


127.0.0.1 localhost
172.16.10.8 mail.mydomain.com mail.mydomain.com

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
~
~

falko
3rd July 2007, 17:05
/etc/network/interfaces should look like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.16.10.8
netmask 255.255.255.0
gateway 172.16.10.1(The leading spaces are important.)

Did you change the IP address also in the settings of the web site(s) in ISPConfig?

dayjahone
3rd July 2007, 17:12
Yes, I did change the IP address of the site.

I added the leading spaces. Do I need to restart anything? I rebooted and it still just displays the contents of /var/www directory.

dayjahone
4th July 2007, 15:52
Maybe something was cached . . . It's working fine now. Thanks!