1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

time out issue when accessing websites via lan

Discussion in 'Apache' started by ghm33, Apr 10, 2016.

  1. #1
    I setup LAMPP and virtual hosts on my Ubuntu 14.04 with lan ip 192.168.0.106.

    I set up two websites with directories /srv/www/d6/public_html and /srv/www/d7/public_html.

    here is the contents of /etc/apache2/sites-available/d6.com.conf. The d7 .com.conf is similar just edited for d7.

    # domain: example.com
    # public: /srv/www/d6/public_html/

    <VirtualHost 192.168.0.106>
    # Admin email, Server Name (domain name), and any aliases
    ServerAdmin
    ServerName d6.local
    ServerAlias d6

    # Index file and Document Root (where the public files are located)
    DirectoryIndex index.html index.php
    DocumentRoot /srv/www/d6/public_html/
    # Log file locations
    LogLevel warn
    ErrorLog /srv/www/d6/log/error.log
    CustomLog /srv/www/d6/log/access.log combined
    </VirtualHost>​

    when I access from the local machine both websites on d6 and d7 load fine.

    when i access via my win7 PC on the same lan nothing loads then it times out. But when I enter 192.168.0.106 I get the site on d6 quickly and normally.

    here is my ubuntu etc/hosts file:

    127.0.0.1 localhost
    127.0.0.1 d6.local
    127.0.0.1 d7.local
    192.168.0.106 d6.local
    192.168.0.106 d7.local​

    I placed these on my win7 host file:

    192.168.1.106 d6.local
    192.168.1.106 d7.local​

    when I ping either i get:

    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.

    C:\Users\whut>ping d7.local

    Pinging d7.local [192.168.1.106] with 32 bytes of data:
    Request timed out.
    Request timed out.
    Request timed out.​

    why does it time out?
    any hints appreciated tia.
     
    ghm33, Apr 10, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    It's not the DNS - as you can see from the ping, it finds the correct IP-address for pinging, but it doesn't get access - which leads me to believe there is a problem either on the router or on the computer acting as a server. Maybe you have firewall-settings that prevent access?
     
    PoPSiCLe, Apr 11, 2016 IP
  3. truz

    truz Well-Known Member

    Messages:
    81
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Try disabling the firewall and see if that's your problem.
     
    truz, Apr 11, 2016 IP
  4. ghm33

    ghm33 Greenhorn

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #4
    thanks to my eagle eyed friend it's fixed.

    the correct IP address is 192.168.0.106
    the ip address i placed in the win host file is 192.168.1.106

    works ok now.
     
    ghm33, Apr 11, 2016 IP