os별, chip별 nginx 경로

mac과 linux(ubuntu)에서, 그리고 brew로 설치할 때 mac이 intel인지 apple silicon인지에 따라 경로가 다 다르다. 구글링 등으로 자료를 얻을 때 본인의 칩을 확인해야 한다.

mac - intel, brew로 설치

conf : /usr/local/etc/nginx
nginx : /usr/local/Cellar/nginx/1.21.6
html : /usr/local/var/www (nginx 폴더 속의 symbolic link)

mac - apple silicon, brew로 설치

conf : /opt/homebrew/etc/nginx/nginx.conf
nginx : /opt/homebrew/Cellar/nginx/1.23.1
html : /opt/homebrew/var/www

ubuntu

conf : /etc/nginx/nginx.conf
html : /var/www/html

apt로 install
sudo apt install nginx

상태나 재시작
sudo systemctl status nginx
sudo systemctl restart nginx

brew의 경우 brew info nginx 로 정보 얻을 수 있다.