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

This may be super easy so I apologize in advance but my strengths are in coding.

Why can't I access my localhost at localhost:8080?
127.0.0.1:8080 - works
127.0.0.1:80 - doesn't work
127.0.0.1 - doesn't work

localhost - works
localhost:80 - forwards to localhost and works
localhost:8080 - doesn't work

I am trying to adjust my hosts/etc file to include

localhost  sandbox.dev  

In turn I would like to access my app at sandbox.dev:8080/test-file.php. So far, I haven't been successful so any help would be appreciated. Thanks.

share|improve this question

closed as not a real question by MDMarra, EEAA, Ward, John Gardeniers, Iain Oct 26 '12 at 8:15

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Describing a problem as "doesn't work" is not really very helpful. What exactly happens when you try it? How far do you get? Do you get an error message? –  David Schwartz Oct 26 '12 at 2:16

1 Answer 1

up vote 1 down vote accepted

Your hosts file needs the first entry on each line to be an ip address, like

127.0.0.1 localhost sandbox.dev

share|improve this answer

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