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

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!

## migrated from stackoverflow.comOct 24 '11 at 18:00

This question came from our site for professional and enthusiast programmers.

• no one has encountered this problem before? :( – vemoxy Nov 2 '11 at 2:09

Search for a line that start with ServerName. If the line points to port 8080, change it to 80.
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.