Results 1 to 7 of 7

Thread: Chrome downloads http://localhost/ but not http://127.0.0.1/

Hybrid View

  1. #1
    Join Date
    Aug 2010
    Beans
    2

    Chrome downloads http://localhost/ but http://127.0.0.1/ works fine

    Hello,

    Here are the app versions:
    - Ubuntu 10.04 Lucid Lynx
    - Chrome 5.0.375.127 (with or without --enable-ipv6)
    - Apache 2.2.14

    When I go to http://localhost/ a file named "download" gets downloaded. I have no such file in my server, thus this is part of Chrome's strangenesses.
    The file contains "<?php phpinfo(); ?>" the same content as my phpinfo.php file.

    But I do have an index.html file containing just "It Works", but it doesn't get viewed unless I type explicitly http://localhost/index.html

    BUT, when I type http://127.0.0.1/ without adding index.html to the URL, it works!

    The strange thing is that this issue does not exist with Firefox. So when I type http://localhost/ I get my index.html as I expect it.


    Before trying with Firefox, I thought it was an issue with my apache config, but now I don't know if Apache, Chrome, or both are the source of the problem.

    Thanks for any help!
    Last edited by teabee89; August 24th, 2010 at 08:59 AM. Reason: ambiguous title

  2. #2
    Join Date
    Aug 2010
    Beans
    2

    Re: Chrome downloads http://localhost/ but not http://127.0.0.1/

    Anyone? Anything?

  3. #3
    Join Date
    May 2006
    Beans
    1

    Re: Chrome downloads http://localhost/ but not http://127.0.0.1/

    just had the same issue with 10.10, thought I was going crazy at first...

  4. #4
    Join Date
    Jan 2011
    Beans
    4

    Lightbulb Re: Chrome downloads http://localhost/ but not http://127.0.0.1/

    BUMP

    Sorry if you guys have figured this out or not, but I just had the same issue after uninstall some web server packages and all I had to do was go into Google Chrome's Preferences and clear all of the browsing data. 'http://localhost/' then quit downloading that 'download' file and I was able to view my index and everything just fine.

    Jake

  5. #5
    Join Date
    Apr 2009
    Location
    Midwest, U.S.A.
    Beans
    1,209
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Chrome downloads http://localhost/ but not http://127.0.0.1/

    Do you have a '/var/www/' directory?
    Does it contain a file 'index.html'?
    Laptop: Dell Inspiron 8200 - Fedora 13 - Goddard
    Desktop: Self-Built - [Ku, Lu, Xu, U]buntu - Lucid 10.04.3 (LTS)
    Linux User: 498249 / Ubuntu User: 29241

  6. #6
    Join Date
    Sep 2005
    Beans
    1,603
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Chrome downloads http://localhost/ but http://127.0.0.1/ works fine

    Quote Originally Posted by teabee89 View Post
    Hello,

    Here are the app versions:
    - Ubuntu 10.04 Lucid Lynx
    - Chrome 5.0.375.127 (with or without --enable-ipv6)
    - Apache 2.2.14

    When I go to http://localhost/ a file named "download" gets downloaded. I have no such file in my server, thus this is part of Chrome's strangenesses.
    The file contains "<?php phpinfo(); ?>" the same content as my phpinfo.php file.

    But I do have an index.html file containing just "It Works", but it doesn't get viewed unless I type explicitly http://localhost/index.html

    BUT, when I type http://127.0.0.1/ without adding index.html to the URL, it works!

    The strange thing is that this issue does not exist with Firefox. So when I type http://localhost/ I get my index.html as I expect it.


    Before trying with Firefox, I thought it was an issue with my apache config, but now I don't know if Apache, Chrome, or both are the source of the problem.

    Thanks for any help!
    Hahaha, yeah I run into this often. Ok so you installed the PHP addon for Apache, did you run
    sudo a2enmod php5
    Um.... if that doesn't work try modifying the virtual host and creating a new one specifically for local host. When I find the information on how I fixed mine, I'll repost back, but I have had this issue often and usually it's something stupid like I didn't install x, y, z, or enable x, y or z

  7. #7
    Join Date
    Sep 2008
    Beans
    64
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Chrome downloads http://localhost/ but not http://127.0.0.1/

    I just ran into this problem today. I know this is an old thread, but if anybody could find another solution for this or give me some steps to trouble shoot that would be amazing. Thanks in advance

    Edit:

    Never mind forgot to clear my browser cache. Thanks anyways.
    Last edited by sportsdude81; March 2nd, 2012 at 11:06 PM.

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
  •