Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: LAN website not accessible from any Windows LAN browsers

  1. #1
    Join Date
    Oct 2010
    Beans
    23

    LAN website not accessible from any Windows LAN browsers

    I have a website on a standalone Ubuntu server (using virtual host).
    I can access the site from 3 different Macs using Safari, Firefox and Chrome.
    I can access the site from my Mac using virtual Windows XP Pro in VirtualBox.

    But I cannot access the site from any Windows machine on the LAN, and it's frustrating
    I cannot get to it with name resolution nor with IP address.

    Here are some of my related configs:

    In sites-available (also in sites-enabled)
    mywebsite.conf
    <VirtualHost *:80>
    DocumentRoot /var/www/mywebsite
    ServerName mywebsite
    ServerAlias *mywebsite
    Directory /var/www/mywebsite
    </VirtualHost>

    ports.conf
    NameVirtualHost *:80
    Listen 80

    UFW
    22 ALLOW IN Anywhere
    80 ALLOW IN Anywhere
    8080 ALLOW IN Anywhere
    137/udp ALLOW IN 192.168.2.0/24
    138/udp ALLOW IN 192.168.2.0/24
    139/tcp ALLOW IN 192.168.2.0/24
    445/tcp ALLOW IN 192.168.2.0/24
    3306/tcp ALLOW IN 192.168.2.0/24

    Does anyone know why I can get my site on Macs, but not Windows?

  2. #2
    Join Date
    Sep 2007
    Location
    Olympia, Washington
    Beans
    548
    Distro
    Ubuntu

    Re: LAN website not accessible from any Windows LAN browsers

    If you are not operating DNS, you need to add your sites to the Windows /etc/hosts. Here is a how-to http://nwlinux.com/change-the-etchos...es-in-windows/
    ~Mark
    http://nwlinux.com - tech blog

  3. #3
    Join Date
    Oct 2010
    Beans
    23

    Re: LAN website not accessible from any Windows LAN browsers

    Thanks for the reply Mark, but I already have the host file populated on each Windows machine with all IPs and names, plus running Ubuntu as the WINS server.
    Network name resolution works perfectly fine for network file sharing on all machines, Windows, Linux & Mac.
    Samba works fine too, and the Windows machines can access WWW with no problems.
    I can access mywebsite from the Macs and Linux machines, but not the Windows machines.
    I was able to access mywebsite from one Windows machine by turning off its Windows firewall. I haven't tried it on any others yet, because I'm wondering what Windows firewall exception is needed to make it work - ports 137, 138, 139, 445 and 3306 are already open in the Windows firewall, and 80 is open, since there is never a problem accessing any www sites.

  4. #4
    Join Date
    Oct 2005
    Location
    Adelaide, South Australia
    Beans
    746
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: LAN website not accessible from any Windows LAN browsers

    WINS is only an layer seven protocol, so it only resolves name resolution for Samba.

    To resolve names at the level required by apache you need to have a layer three protocol service like avahi or bind running.

    This is why your macs can resolve the address but no the windows machines.

    easiest way to address this and minimise the amount of host file editing is to install "bonjour printing services for windows", this allows windows to see the avahi/bonjour broadcasts on your LAN.

    You'll also need to allow traffic on port 5353 udp on your local computers for avahi/bonjour to work properly for your local area network.

    Your ability to access websites on the internet by hostname is nothing to do with you being unable to access the website on your local network.

    You might also be interested in this :

    http://stackoverflow.com/questions/7...896533#3896533
    Last edited by airtonix; January 13th, 2011 at 02:19 PM.
    Fear is the mindkiller....
    The little death that obliterates...

  5. #5
    Join Date
    Oct 2010
    Beans
    23

    Re: LAN website not accessible from any Windows LAN browsers

    Thanks for the reply, but that is what is so maddening about this.

    Avahi has always been running on the Ubuntu server, and Bonjour has always been running on Windows.
    I mentioned Samba and WWW access to show that there are no networking issues.

    I have an exact copy of mywebsite plus several other websites running through Xampp on my Mac, and all the machines (Mac, Windows & Linux) can access them all, both with name resolution and IP address.

    So it must be a problem with a configuration in either Ubuntu or Apache2. That is why I put my conf info in the first post.

    I am befuddled.

  6. #6
    Join Date
    Jun 2007
    Beans
    1,941

    Re: LAN website not accessible from any Windows LAN browsers

    Quote Originally Posted by molinus View Post
    So it must be a problem with a configuration in either Ubuntu or Apache2. That is why I put my conf info in the first post.
    Why do you think that? Especially if turning off the Windows firewall fixed it on that one Win machine...

    I also assume all these machines are on the same switch, vlan, router, what-have-you?

  7. #7
    Join Date
    Oct 2010
    Beans
    23

    Re: LAN website not accessible from any Windows LAN browsers

    I apologize, I should have mentioned that my Windows firewall statement was incorrect.

    When tried to access mywebsite with the firewall off, I entered the IP for the Mac-hosted mywebsite by mistake in my frustration and haste.

    Firewall or not, using Window machines, I cannot get to the Ubuntu-hosted mywebsite via IP or name, but I can get to all of the Mac-hosted sites.

    I don't know if this could be part of the problem or solution, but the Mac-hosted sites use a single httpd.conf under xampp, whereas the Ubuntu-hosted sites use individual .conf files under Sites-Available & SItes-Enabled.

    Also, yes - 1 gateway router for ISP, and 1 24-port switch - 1 subnet.
    Last edited by molinus; January 13th, 2011 at 04:48 PM.

  8. #8
    Join Date
    Oct 2007
    Beans
    218
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: LAN website not accessible from any Windows LAN browsers

    Ok the Wins PCs that cannot access the site. Can you do the Following.

    1: Ping the IP address of the Server - do you get a respond.
    2: Can you access the site as serverip/mywebsite
    3: Does entering serverip into the browser bring to you to the default apache page

    Rgds
    Chris

  9. #9
    Join Date
    Oct 2010
    Beans
    23

    Re: LAN website not accessible from any Windows LAN browsers

    Thanks for the tips Chris - I assumed there was connectivity since mounted network drives worked.

    I don't know the explanation, but here is what happened:

    Pinging the server IP (and Name) was fine from all the Macs, but timed out from all the PCs.

    Then on 2 different PCs, I got the same results by doing this:
    1) Pinged server IP (and Name) again (timed out)
    2) Went to Network Browser, and even though no ping response, found the server name listed and connected to a shared folder on the server, then closed it.
    Note: I did not have to log in to the server - I just opened the shared folder from Network Browser.

    After that, pinging the server IP (and Name) worked and mywebsite was available.

    I don't know why I would have to connect to the server via Network Browser first, to make the website available, and only from PCs.
    Last edited by molinus; January 13th, 2011 at 08:12 PM.

  10. #10
    Join Date
    Oct 2010
    Beans
    23

    Re: LAN website not accessible from any Windows LAN browsers

    Update:

    I just went back after lunch, and cannot get to the server via the Network Browser, nor can I get mywebsite again (just from the PCs).

    During that time, there have been no interactions (no input/output) on either the server or the PCs!!!

    Something is severely fubar with Ubuntu.

    I think maybe WINS is not working correctly - it seems to work intermittently, so I am considering setting up BIND DNS on Ubuntu.

    Does anyone think BIND DNS might solve the website issues and Network Browsing from all machines?

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •