맥에서 brew를 이용해서 nginx 설치하는 방법


brew 를 이용해서 nginx를 설치합니다.

brew install nginx

설치가 다 되고 나서 아래 명령으로 관련 내용을 알아볼 수 있습니다.

brew info nginx
==> nginx: stable 1.23.3 (bottled), HEAD
HTTP(S) server and reverse proxy, and IMAP/POP3 proxy server
https://nginx.org/
/opt/homebrew/Cellar/nginx/1.23.3 (26 files, 2.2MB) *
  Poured from bottle on 2023-02-07 at 11:15:34
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/nginx.rb
License: BSD-2-Clause
==> Dependencies
Required: openssl@1.1 ✔, pcre2 ✔
==> Options
--HEAD
	Install HEAD version
==> Caveats
Docroot is: /opt/homebrew/var/www

The default port has been set in /opt/homebrew/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /opt/homebrew/etc/nginx/servers/.

중요한 것은 Docroot 위치가 /opt/homebrew/var/www 라는 것과 설정파일이 /opt/homebrew/etc/nginx/nginx.conf 라는 것입니다.

nginx 를 실행시키는 방법은 아래와 같습니다.

brew services nginx start
,

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다