问题
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.
回答1:
You'll want to check the error log for anything related to nginx. MNPP appears to install nginx in /Applications/MNPP/Library/nginx.
回答2:
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
来源:https://stackoverflow.com/questions/19607457/connection-refused-on-php-application-on-nginx-on-my-mac