Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
no one has encountered this problem before? :( –  vemoxy Nov 2 '11 at 2:09
add comment

migrated from stackoverflow.com Oct 24 '11 at 18:00

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

3 Answers

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|improve this answer
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.