XAMPP apache localhost - browsers point to the wrong port even after I changed Listen port back to 80

7,877

I have the same problem with a localhost site that was originally running on port 8080 which I switched to port 80. It was a Wordpress site, and the site config caused the browser to redirect to port 8080. I corrected the settings, yet every visit to localhost was automatically requested on port 8080, even when appending :80 to the end of the domain.

Share:
7,877

Related videos on Youtube

vemoxy
Author by

vemoxy

Updated on September 18, 2022

Comments

  • vemoxy
    vemoxy over 1 year

    Running Windows 7.

    Got a weird problem - I used to use port 8080 for my apache on XAMPP as somehow I couldn't get it to work on 80. I did that by changing the Listen port of /xampp/apache/conf/httpd.conf. A few days ago I changed it back and it started working fine again.. However my browsers are now trying to point to 8080 whenever I try to access localhost.

    For example, if I type

    localhost/myproject
    

    in Firefox/Chrome, it will redirect it to

    localhost:8080/myproject
    

    and say that the Firefox/Chrome couldn't connect. Strangely enough, if I edit the address bar to remove the 8080, it will work. BUT if I replace the whole address with a new one (pasting the localhost/myproject over), it will do the same weird redirecting.

    I've tried to clear my browsing data/cache, and even reinstalled Chrome, but it still seems to point to the wrong port. It's as if the browsers 'remembered' the 8080 port and keep trying to access it.

    Internet Explorer works fine, probably because I haven't accessed localhost:8080 through IE before.

    Would love to know any fix to this problem. Thanks!

    • vemoxy
      vemoxy over 12 years
      no one has encountered this problem before? :(