How to reach my website? I only see de default apache test page

Discussion in 'HOWTO-Related Questions' started by Robin.k, Aug 5, 2016.

  1. Robin.k

    Robin.k New Member

    Hi, i have new installed Debian with ISPconfig. After it, i setup a new client "test", and setup under client "test" a new website "test.com". When i put my local ip address 192.168.1.22 in the browser, i only see the test page wat is located under /var/www/html
    What do i wrong? Ho do i reach my website page under /var/www/test.com/web ?
    I also tried 192.168.1.22/test.com but get the error "the request page URL test.com was not found on this server.

    Thanks Robin
     
    Last edited: Aug 6, 2016
  2. sjau

    sjau Local Meanie Moderator

    well, since you can host multiple sites, the server doesn't know what to show you when you call it by ip. So what you have to do is edit your hosts file and ad 192.168.1.22 test.com to it. So that the server knows you want to access test.com
     
  3. Robin.k

    Robin.k New Member

    Hi, thanks for the information. In ISPConfig panel, tab "system", tab "server IP address" i put the address 192.168.1.22.
    Now i can reach my website with local address 192.168.1.22 in the browser.
    But this is not the way you mentioned above i think?
    So if i edit the host file and put 192.168.1.22 test.com to it, i can reach the website with 192.168.1.22/test.com
    Is this correct?
    When i make a second website test2.com and also put it in the host file with 192.168.1.22 test2.com, then i can reach the 2 websites
    with 192.168.1.22/test.com and 192.168.1.22/test2.com, is this correct?
    Where can i find the host file to edit? I'm not a expert...

    Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No. Editing the hosts file repleaces dns, so you just enter:

    test.com

    in the browser then to reach the site.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This depends on the OS that you use. Google will show you the right place when you search for your OS.
     
  6. Robin.k

    Robin.k New Member

    Thanks for your replay.
    In my browser "Safari", i place the ip address 192.168.1.22, it shows me website test.com, but when i place test.com it shows me not my website test.com
    What do i wrong, are there not correct settings in Tab "website"? or are there another not correct settings.

    Thanks
     
    Last edited: Aug 9, 2016
  7. knightrideruk

    knightrideruk New Member

    Hi
    From what you have said so far your hosts file needs to look something like:
    192.168.1.22 test.com
    192.168.1.22 2.test.com
    Because you are using 1 IP address for your websites you need to tell Apache the name/subdomain for each site under the main domain (test.com) don't forget the period.
    Regards
    Knightrideruk
    Out of the darkness comes light......
     
  8. Robin.k

    Robin.k New Member

    Hi, where can i find the host file? what is the name and what is his extension of the host file.
    Regards
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    You missed to add test.com to the hosts file on your desktop.

    The location of the hosts file depends on the OS, it has no extension. Search at google for your os plus hosts file, you will find plenty of posts that explain where you can find it.
     
  10. knightrideruk

    knightrideruk New Member

    What OS are you using?
    Regards
    Knightrideruk
    Out of the darkness comes light......
     

Share This Page