내장 아파치 서버
macOS 에는 기본적으로 내장 아파치 웹서버가 설치되어 있다.
버전확인
apachectl -v
내장 아파치 실행
sudo apachectl start
브라우저에서 localhost 로 접속해 본다.
폴더확인
cd /Library/WebServer/Documents
Homebrew 를 이용한 아파치 웹서버 설치
내장 아파치의 실행 종료 및 자동 로드 스크립트 제거
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
설치하기
brew install httpd
실행 및 중지
brew services start httpd
brew services stop httpd
brew services restart httpd
httpd 상태 확인
httpd -V
httpd 설정 변경하기
httpd.conf 의 위치
- Intel Mac : /usr/local/etc/httpd
- M2 Mac : /opt/homebrew/etc/httpd
vi /opt/homebrew/etc/httpd/httpd.conf
httpd 에러 관련
homebrew 실행 폴더
# Intel CPU
cd /usr/local/bin
# Apple Silcon
cd /opt/homebrew/bin
homebrew 설치 폴더
# Intel CPU
cd /usr/local/Cellar
# Apple Silicon
cd /opt/homebrew/Cellar
httpd 가 계속해서 실행이 안되고 중지된 상태에서 다음과 같은 에러가 발생한 경우
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/UserID/Library/LaunchAgents/homebrew.mxcl.httpd.plist` exited with 5.
brew services stop httpd
sudo apachectl -k stop
brew services start httpd
brew services list
'Tools > MacOS' 카테고리의 다른 글
macOS 에서 movavi 스크린 캡쳐시 내장 사운드가 녹음이 안될때 (1) | 2023.10.23 |
---|---|
macOS 소노마(Sonoma) 14 버전 달라진점 (0) | 2023.10.20 |
MacOS(Apple Silicon) M1에서 httpd, php, Composer, mariaDB 설치하기. (0) | 2023.09.03 |
MacOS - httpd error 256 (아파치 서버가 동작안하는 경우) (0) | 2023.01.27 |
Homebrew 사용법 (0) | 2022.10.09 |
내장 아파치 서버
macOS 에는 기본적으로 내장 아파치 웹서버가 설치되어 있다.
버전확인
apachectl -v
내장 아파치 실행
sudo apachectl start
브라우저에서 localhost 로 접속해 본다.
폴더확인
cd /Library/WebServer/Documents
Homebrew 를 이용한 아파치 웹서버 설치
내장 아파치의 실행 종료 및 자동 로드 스크립트 제거
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
설치하기
brew install httpd
실행 및 중지
brew services start httpd
brew services stop httpd
brew services restart httpd
httpd 상태 확인
httpd -V
httpd 설정 변경하기
httpd.conf 의 위치
- Intel Mac : /usr/local/etc/httpd
- M2 Mac : /opt/homebrew/etc/httpd
vi /opt/homebrew/etc/httpd/httpd.conf
httpd 에러 관련
homebrew 실행 폴더
# Intel CPU
cd /usr/local/bin
# Apple Silcon
cd /opt/homebrew/bin
homebrew 설치 폴더
# Intel CPU
cd /usr/local/Cellar
# Apple Silicon
cd /opt/homebrew/Cellar
httpd 가 계속해서 실행이 안되고 중지된 상태에서 다음과 같은 에러가 발생한 경우
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/UserID/Library/LaunchAgents/homebrew.mxcl.httpd.plist` exited with 5.
brew services stop httpd
sudo apachectl -k stop
brew services start httpd
brew services list
'Tools > MacOS' 카테고리의 다른 글
macOS 에서 movavi 스크린 캡쳐시 내장 사운드가 녹음이 안될때 (1) | 2023.10.23 |
---|---|
macOS 소노마(Sonoma) 14 버전 달라진점 (0) | 2023.10.20 |
MacOS(Apple Silicon) M1에서 httpd, php, Composer, mariaDB 설치하기. (0) | 2023.09.03 |
MacOS - httpd error 256 (아파치 서버가 동작안하는 경우) (0) | 2023.01.27 |
Homebrew 사용법 (0) | 2022.10.09 |