I have successfully installed nginx on my MAC with homebrew
brew install nginx
but i can't find from where is this default page called.
In nginx.conf under location says
root html;
and i can't find it. Please help.
Lewis4u's answer may be right! But I think we should have a clearer explanation
In nginx.conf file we see the root path is:
root html;
The question is: Where is "html" relative path? This relative path is set at compile time. You can check the path by command
$>nginx -V
You will see "--prefix=/usr/local/Cellar/nginx/1.12.0_1", this is the folder of nginx files. Now you should "cd" to this directory to see your "html" folder.
$> cd /usr/local/Cellar/nginx/1.12.0_1
$> ls -l html
Then you will see the "html" folder is a softlink to "/usr/local/var/www"
In conclusion, in my case, the "html" folder is "/usr/local/var/www". It may be different on your MAC. But hey, you got the method to find out. Right?!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With