개발

[Nginx] 맥os에 Nginx 설치하기

2023. 7. 8. 13:46

맥북에서 Nginx 설치를 해보고자 한다. 맥OS 버전은 13.0 기준이다.

 

먼저 brew install nginx로 설치해준다.

==> Fetching nginx
==> Downloading https://ghcr.io/v2/homebrew/core/nginx/manifests/1.25.1_1
...
==> Installing nginx
==> Pouring nginx--1.25.1_1.arm64_ventura.bottle.tar.gz
==> 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/.

To start nginx now and restart at login:
  brew services start nginx
Or, if you don't want/need a background service you can just run:
  /opt/homebrew/opt/nginx/bin/nginx -g daemon off;

 

Nginx 설정파일은 /opt/homebrew/etc/nginx/nginx.conf이고, static 파일 경로는 /opt/homebrew/var/www으로 설정되어 있다.

 

이후 brew services start nginx으로 서비스를 시작해주고 http://localhost:8080/으로 접속하면 다음과 같은 화면을 확인할 수 있다.

 

 

 

 

728x90
저작자표시 비영리 변경금지 (새창열림)

'개발' 카테고리의 다른 글

[Miniconda] Ubuntu에 Miniconda 설치하기  (0) 2023.08.01
Gunicorn & Uvicorn  (0) 2023.07.09
[Nginx] forward & reverse proxy  (0) 2023.07.08
[fastapi] logging format 설정  (0) 2023.07.08
[Miniconda] CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. 에러  (0) 2023.07.08
'개발' 카테고리의 다른 글
  • [Miniconda] Ubuntu에 Miniconda 설치하기
  • Gunicorn & Uvicorn
  • [Nginx] forward & reverse proxy
  • [fastapi] logging format 설정
Fine애플
Fine애플
이것저것
Fine애플
끄적끄적
Fine애플
전체
오늘
어제
  • 분류 전체보기 (167)
    • 논문 및 개념 정리 (27)
    • Pattern Recognition (8)
    • 개발 (57)
    • python 메모 (45)
    • pytorch, tensorflow (5)
    • 알고리즘 (9)
    • Toy Projects (4)
    • 통계이론 (2)
    • Reinforcement Learning (10)

블로그 메뉴

  • 홈

공지사항

인기 글

태그

  • miniconda
  • 개발환경
  • Docker
  • container
  • ubuntu
  • 알고리즘
  • Probability
  • GPU
  • tensorflow
  • Bert
  • BigBird
  • reinforcement learning
  • 딥러닝
  • PyTorch
  • 자연어
  • pandas
  • nlp
  • python
  • transformer
  • 언어모델

최근 댓글

최근 글

hELLO · Designed By 정상우.
Fine애플
[Nginx] 맥os에 Nginx 설치하기
상단으로

티스토리툴바

개인정보

  • 티스토리 홈
  • 포럼
  • 로그인

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.