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

Thread: Unable to access localhost

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

    Unable to access localhost

    My Ubuntu 7.10 box has a LAMP install. However, I cannot access my pages using http://localhost/ or any port variation. I tried adding
    Code:
    ServerName localhost
    to my httpd.conf. That killed my server with zero access using my domain name (http://buckyspalace.net) or http://localhost. I then tried adding the above code to my /etc/apache2/sites-available/default with the same results.

    Any takers on a solution?
    ~Mark
    http://nwlinux.com - tech blog

  2. #2
    Join Date
    Jun 2008
    Location
    Tennessee
    Beans
    3,415

    Re: Unable to access localhost

    Is apache running?

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

    Re: Unable to access localhost

    Absolutely, to not have Apache running is sacrilidge!
    ~Mark
    http://nwlinux.com - tech blog

  4. #4
    Join Date
    Jun 2008
    Location
    Tennessee
    Beans
    3,415

    Re: Unable to access localhost

    - What error do you get when you try to bring up localhost? 404? 403? 500?

    - What's the output of "sudo netstat -tunap |grep apache2

    - What's the output of "sudo cat /var/log/syslog |grep -i apache"

    - what's the output of "sudo tail /var/log/apache2/error_log"

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

    Re: Unable to access localhost

    The localhost simply times out.
    Code:
    sudo netstat -tunap |grep apache2
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     14403/apache2       
    tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN     14403/apache2
    The second terminal directive produces nothing (I sent the info to a .txt and it was blank too. The third directive prints
    Code:
    sudo tail /var/log/apache2/error.log
    [Sat Oct 18 19:38:54 2008] [error] [client 24.18.97.15] <ul></ul>
    [Sat Oct 18 19:38:54 2008] [error] [client 24.18.97.15] <ul></ul>
    [Sat Oct 18 19:38:54 2008] [error] [client 24.18.97.15] <ul></ul>
    [Sat Oct 18 19:38:54 2008] [error] [client 24.18.97.15] <ul></ul>
    [Sat Oct 18 19:38:54 2008] [error] [client 24.18.97.15] <ul></ul>
    [Sat Oct 18 19:38:54 2008] [error] [client 24.18.97.15] <ul></ul>
    [Sat Oct 18 19:38:54 2008] [error] [client 24.18.97.15] <ul></ul>
    [Sat Oct 18 19:53:20 2008] [error] [client 66.249.73.113] File does not exist: /var/www/node
    [Sat Oct 18 19:55:06 2008] [error] [client 66.249.73.113] File does not exist: /usr/share/webcalendar/www/robots.txt
    [Sat Oct 18 19:55:06 2008] [error] [client 66.249.73.113] File does not exist: /usr/share/webcalendar/www/error_pages
    .
    ~Mark
    http://nwlinux.com - tech blog

  6. #6
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,008
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Unable to access localhost

    what happens if you do http://127.0.0.1 i.s.o. http://localhost ?

  7. #7
    Join Date
    Oct 2007
    Beans
    89

    Re: Unable to access localhost

    Post the contents of /etc/hosts

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

    Re: Unable to access localhost

    127.0.0.1=403error and my localhost meets my timeout

    Code:
    127.0.0.1	localhost
    127.0.1.1	buckyspalace
    "router ip"	localhost
    "router ip"	buckyspalace
    ~Mark
    http://nwlinux.com - tech blog

  9. #9
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,008
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Unable to access localhost

    127.0.1.1 buckyspalace and "router ip" localhost don't belong there

  10. #10
    Join Date
    Jun 2008
    Location
    Tennessee
    Beans
    3,415

    Re: Unable to access localhost

    Yep, the whole point of a hosts file is to do name resolution -- to resolve a name to an IP. If you give a name (like localhost) two IP addresses, how does it know which one to resolve?

    localhost should only ever point to 127.0.0.1. Pointing it to anything else will cause problems.

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
  •