Mac安装Nginx

安装

brew install nginx

启动

nginx

访问 localhost:8080 出现nginx画面即可.

其他命令

nginx -s reload|stop|quit

默认部署地址

/usr/local/var/www

nginx安装目录

/usr/local/etc/nginx/

问题

  1. nginx already installed, it's just not linked

    brew link nginx
  2. Could not symlink share/man/man8/nginx.8

    sudo chmod ug+w share/man/man8/nginx.8
  3. 403问题: 可能是权限问题, 改文件夹为755

    chmod -R 755 YOUR_FOLDER

    注意ngincfyix.conf中user的设置, 改成对应的用户,一般为root

你可能感兴趣的:(nginx)