mac nginx配置常见问题
nginx.pi无法运行
ssued a nginx -s stop and after that I got this error when trying to reload it.
[error]: invalid PID number "" in "/var/run/nginx.pid"
That /var/run/nginx/pid file is empty atm.
What do I need to do to fix it?
解决方法:
nginx -c /alidata/server/nginx/conf/nginx.conf
sudo nginx -s reload
绑定80 端口后出现403 错误:
目录/文件权限的问题,查看(ls -l) /Users/, /Users/hm/, /Users/hm/Documents/, /Users/hm/Documents/htdocs/ 以及 /Users/hm/Documents/htdocs/index.html 的权限,
确保均含最后一个x(其他用户的执行权限),倘若/Users/hm/Documents/ 缺少x,执行 chmod o+x /Users/hm/Documents/ 把x 权限添加上即可。