Virtual Domain Not Working.

Discussion in 'Installation/Configuration' started by dayjahone, Jul 2, 2007.

  1. dayjahone

    dayjahone Member

    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.
     
    Last edited: Aug 2, 2007
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  3. dayjahone

    dayjahone Member

    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

    Code:
    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
    
    ~                                                                                             
    ~               
    Code:
    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
    ~                                                                                             
    ~     
     
    Last edited: Aug 2, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

    /etc/network/interfaces should look like this:

    Code:
    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?
     
  5. dayjahone

    dayjahone Member

    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.
     
    Last edited: Jul 3, 2007
  6. dayjahone

    dayjahone Member

    Maybe something was cached . . . It's working fine now. Thanks!
     

Share This Page