1

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!

1
  • no one has encountered this problem before? :(
    – vemoxy
    Nov 2, 2011 at 2:09

4 Answers 4

1

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.

0

I had the same problem. Fixed it by clearing my DNS cache.

0

Check your httpd.conf. (xampp-control > Config for Apache > http.conf)

Search for a line that start with ServerName. If the line points to port 8080, change it to 80.

0

I flushed dns cache (don't know if this really helps), cleared cache in browser, set Server Name to 80, and added / at the end of URL like this localhost/myproject/. This does it for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .