1

I have an nginx app that was running on localhost and now I can no longer access it. I'm truly at a loss for how to diagnose the problem.

Some things I've investigated:

  • TimPeterson$ sudo lsof -i :80 ->shows tons of stuff, but nothing that looks like my app
  • System Preferences -> sharing ->toggle "web sharing" -> doesn't help

I'm not a total noob in that I've had this server running for over a year but obviously I did something or some software update jacked some part of the configuration.

Charles
  • 50,943
  • 13
  • 104
  • 142
tim peterson
  • 23,653
  • 59
  • 177
  • 299
  • perhaps you can check your document root location if it has changed, also, please tell us what do you get as result to get a better idea – Abu Romaïssae Oct 26 '13 at 13:49
  • @AbuRomaïssae the document root has not changed, i'm more inclined to think its some permission issue as `telnet localhost 80` says "connection refused" – tim peterson Oct 26 '13 at 13:51
  • do you get any error ? what's not working exactly ? – Abu Romaïssae Oct 26 '13 at 13:52
  • 2
    `netstat -na | grep 80` and see if anything is listening on port TCP 80. – NG. Oct 26 '13 at 13:54
  • @SB. thanks, hmm it doesn't look like it right? http://imgur.com/tgXQXiw – tim peterson Oct 26 '13 at 13:57
  • 1
    Are you sure nginx is running? `ps aux | grep nginx` - if not, look @ nginx logs to see if anything is messed up – NG. Oct 26 '13 at 13:58
  • @SB. it looks like Nginx is running, right? `Tims-MacBook-Pro-2:html TimPeterson$ ps aux | grep nginx TimPeterson 29607 2.5 0.0 2434892 548 s001 S+ 9:58AM 0:00.01 grep nginx` – tim peterson Oct 26 '13 at 13:59
  • @SB. could this be a permission issue as `telnet localhost 80` says "connection refused"? – tim peterson Oct 26 '13 at 14:02
  • Nope - that's the grep command you just ran ;) - not a permissions issue - nothing is listening on 80 – NG. Oct 26 '13 at 14:02
  • 1
    @SB. so if Nginx isn't running, despite me running my app this could be an [MNPP](https://github.com/jyr/MNPP) issue I guess? I've stopped and started this MAMP/WAMP-like server for over a year now so no idea what would have locked it in the off position despite me starting it. – tim peterson Oct 26 '13 at 14:10
  • Did you try `sudo mnpp nginx start` ? - comment discussion is getting too long.. – NG. Oct 26 '13 at 14:11
  • What has always worked for me in the past is this: `TimPeterson$ sudo mnpp --php53 --start`. Sorry for so much comments, might you be able to chat? – tim peterson Oct 26 '13 at 14:15
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/40052/discussion-between-sb-and-tim-peterson) – NG. Oct 26 '13 at 18:41

2 Answers2

1

You'll want to check the error log for anything related to nginx. MNPP appears to install nginx in /Applications/MNPP/Library/nginx.

NG.
  • 22,560
  • 5
  • 55
  • 61
-1

I'm not sure if its the same in your case, but some time, localhost wont work on my mac os x

Try to use 127.0.0.1 instead of localhost and if it worked, check your /private/etc/hosts file

Abu Romaïssae
  • 3,841
  • 5
  • 37
  • 59