Problem running webpages using apache

Discussion in 'Apache' started by avinash.vllbh, Aug 28, 2012.

  1. #1
    Hi,
    I have installed Apache 2.2 recently and I facing problem in running html pages.

    When I check for http://localhost/ it display "It Works" but when I try to run a small html page in my htdocs Eg: hello.html using "http://localhost/hello.html" it throws an error saying "Oops page appears to be broken. DNS Error server could not be found".

    Please help
     
    avinash.vllbh, Aug 28, 2012 IP
  2. Ray Baron

    Ray Baron Member

    Messages:
    148
    Likes Received:
    10
    Best Answers:
    3
    Trophy Points:
    43
    #2
    Check your apache configuration to ensure that virtual hosts are configured correctly and that the document root is in /htdocs.
     
    Ray Baron, Aug 28, 2012 IP
  3. ironcladservers

    ironcladservers Well-Known Member

    Messages:
    389
    Likes Received:
    20
    Best Answers:
    4
    Trophy Points:
    115
    #3
    Try accessing the page through the IP itself, http://127.0.0.1/hello.html to see if that works first. If it loads then you know Apache is serving pages.
     
    ironcladservers, Aug 28, 2012 IP
  4. avinash.vllbh

    avinash.vllbh Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I have tried changing the document root directory and made the same in conf file.
    It didn't work at first but on clearing the cache it's working good.

    Thank you Ray and Ironclad :)
     
    avinash.vllbh, Aug 28, 2012 IP