0

Install Nginx on Mac local with brew install nginx. I don’t know why nginx local does not have the conf.d folder and the contents in it. (If you use docker run, there will be /etc/nginx/conf.d/default.conf But in Mac local I don’t know why there is no

The main configuration in nginx docker access_log /var/log/nginx/access.log main in nginx.conf; is open, open access.log but there is nothing there, while local nginx has something as soon as it is opened (and The access_log /var/log/nginx/access.log in local nginx.conf is actually a comment by default)

Later, I found that there is a line in default.conf in nginx docker #access_log /var/log/nginx/host.access.log main; Is this to be turned on?

And in nginx docker, nginx.conf has access_log /var/log/nginx/access.log main; but there is still no log. When will this line be used?

2 Answers 2

0

i think the location for the nginx configuration file on mac is different. try to check in /usr/local/etc/nginx/

Sign up to request clarification or add additional context in comments.

2 Comments

I tried it. so i wonder why there is no conf.d/ default.conf at the mac local
For now, I can't be sure why it happened, but I think it happened because it is not official and different versions. CMIIW
0

You can find the location for the Nginx configuration file in /opt/homebrew/etc/nginx/ since you installed it using brew you also can write in the terminal

nginx -t
it will output the configuration file path.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.