macos - Permission issues in nginx -t test after nginx installation
PHPz
PHPz 2017-05-16 17:10:44
0
3
764

The system is mac OS 10.11.8. The xiaohan user installed nginx through brew install nginx in the terminal. The current problem is that the nginx -t test fails under the xiaohan user status. The test can only succeed with the root user permissions. But the browser can access localhost:8080

normally

Already has full permissions on nginx

vim Check the nginx.conf file and the first line is
#user nobody;
Just remove # or change it to
user xiaohan;
, it doesn’t work, please give me some advice, thank you!

PHPz
PHPz

学习是最好的投资!

reply all(3)
大家讲道理

You need to confirm whether the /usr/local/var/run/ directory and nginx.pid file have permissions.

黄舟

I guess your user xiaohan does not have permission to the file /logs/nginx.pid, so when you execute nginx -t under the user xiaohan, Permission denied is reported.

过去多啦不再A梦

Under normal circumstances, only root has access to /logs/nginx.pid. You can use ls -l to view it

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template