Problem with Vhosts (I think)

Discussion in 'Installation/Configuration' started by Scouser, Nov 27, 2005.

  1. Scouser

    Scouser New Member

    Ok I have successfully installed ISPconfig & have a website (www.site1.com) running. I only have 1 IP address and use ZoneEdit for my DNS. This is all fine but when I try to add another site (www.site2.com) to ISPconfig it just points to the first site in the vhosts_ispconfig.conf (www.site1.com). Any advice would be welcome as I don't seem to be able to find anything on these forums addressing this problem so I am assuming it's just me.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you added www.site2.com as new site or as Co-Domain? What do you mean with "just points to the first site in the vhosts_ispconfig.conf"? Please post the content of vhosts_ispconfig.conf here.
     
  3. Scouser

    Scouser New Member

    I have added www.site2.com as a new site.

    If I try to access www.site2.com through a browser the home page for www.site1.co.uk is displayed.

    I have inserted both URLs into my hosts file on my windows machine and can access both that way but from another machine (outside my lan) all I can access is www.site1.co.uk

    Done
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have a router with 2 external IP addresses where the ports are forwarded to your 2 internal IP addresses (192.168.2.100 + 192.168.2.102)?
     
  5. Scouser

    Scouser New Member

    No, I only have one IP external address. 192.168.2.102 is an extra IP address mapped to eth0:0.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    But the server has 2 IP addresses:

    NameVirtualHost 192.168.2.100:80
    NameVirtualHost 192.168.2.102:80

    And the website on the IP: 192.168.2.100 works. So you must have two IP addresses on your server.

    You posted above that you have problems with exeternal access. So you dont have an router and an external IP on that router?
     
  7. falko

    falko Super Moderator Howtoforge Staff

    I think the problem is that you forward port 80 from your router to 192.168.2.100, but www.mysite2.com is on 192.168.2.102. That's why you always see your first site. It would be different if www.mysite2.com also ran on 192.168.0.100.
     
  8. Scouser

    Scouser New Member

    Yes you are correct. The second IP address (102) was put in to try and alleviate the original problem. I have now changed it back to 192.168.2.100 and again www.site1.co.uk works but www.site2.com now displays:-
    Code:
    [SIZE="4"][b]Index of /[/b][/SIZE]
    
    Icon  Name                    Last modified      Size  Description
    [DIR] apache2-default/        04-Oct-2005 07:40    -   
    [DIR] web12/                  29-Nov-2005 18:48    -   
    [DIR] web13/                  24-Nov-2005 18:44    -   
    [DIR] webalizer/              04-Nov-2005 07:35    -   
    [DIR] www.site2.com/          29-Nov-2005 18:48    -   
    [DIR] www.site1.co.uk/        24-Nov-2005 18:44    -   
    
    [i][SIZE="2"]Apache/2.0.54 (Ubuntu) PHP/4.4.0-3 mod_ssl/2.0.54 OpenSSL/0.9.7g Server at www.site2.com Port 80[/SIZE][/i]
    Now I am back to square one & don't know where to go next.:confused:
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Do you maybe have www.site2.com somewhere in your main httpd.conf or in sites-enabled?
     

Share This Page