Mac Nginx 安裝 ============= Mac =================== mac 安裝 brew install nginx 執行 nginx ------------------------------------------------------- www 預設路徑 ( mac m1) /opt/homebrew/var/www -------------------------------------------------------- sudo nginx 啟動服務 sudo nginx -s reload 重新加載 sudo nginx -s reopen 重新啟動 sudo nginx -s quit 退出(處理完事情走) open /opt/homebrew/etc/nginx/ 查看nginx安裝目錄 -------------------------------------------------------- 1.網站存放路徑 /opt/homebrew/var/www 2.Nginx配置文件路徑 /opt/homebrew/etc/nginx/nginx.conf 3.服務配置文件 /opt/homebrew/etc/nginx/servers/ 4.後台進程守護,如果您不想要/不需要後台服務,您可以運行: /opt/homebrew/opt/nginx/bin/nginx -g守護進程關閉; --------------------------------------------------------