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.

Apache 2.4 not resolving host name's only IP's

Discussion in 'Apache' started by davidmgc, Sep 19, 2013.

  1. #1
    Hello,

    Our apache server is not resolving host names only ips. When i check the access.log it is denying entry for any host

    for example i have set "Require host test1.internal.com.au" in the httpd.conf and the follow occurs
    test1.internal.com.au denied

    If i set the physical ip of test1.internal.com.au (192.168.3.23) in httpd.conf then there is no issue and test1 can access the machine.

    any ideas anyone?

    cheers

    david
     
    Solved! View solution.
    davidmgc, Sep 19, 2013 IP
  2. #2
    maybe you have HostnameLookups Off in your httpd.conf?
     
    Krnl, Sep 24, 2013 IP
  3. davidmgc

    davidmgc Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Hello krnl,

    thanks for the reply. I have turned on HostnameLookups and it seems to be working although it is only resolve host names to a pc level e.g testpc.internal.com.au and testpc1.internal.com.au are being read as testpc and testpc1. Is there a way to get apache to read the full e.g "testpc1.internal.com.au"
     
    davidmgc, Sep 24, 2013 IP
  4. Krnl

    Krnl Peon

    Messages:
    60
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #4
    Are you certain that your IP is resolving to testpc1? What does your apache access log say - testpc or testpc1?
     
    Krnl, Sep 24, 2013 IP
  5. davidmgc

    davidmgc Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    Both computers when I access come up in the log as testpc and testpc1.

    I want them to show up as testpc.internal.com.au and testpc1.internal.com.au as I want to restrict access to only internal.com.au

    hope that makes sense?
     
    davidmgc, Sep 24, 2013 IP
  6. Krnl

    Krnl Peon

    Messages:
    60
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    0
    #6
    Your /etc/host.conf file (assuming a redhat-based system) probably says the following

    order hosts,bind
    Code (markup):
    So, when your server is resolving the IP's on your local network, it first looks at the /etc/hosts file, and if nothing is found there, it will query DNS to resolve the IP address. So, if you have entries in /etc/hosts that say testpc and testpc1, then that would indicate why they are resolving as they are.
     
    Krnl, Sep 24, 2013 IP
  7. davidmgc

    davidmgc Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #7
    Hello,

    The apache server is windows 2008 and the clients are windows 7.

    ill check the client host files. Is there any checks I need to do on the windows host?

    regardsdv
     
    davidmgc, Sep 24, 2013 IP