애플 맥미니, 맥북에 Apache 웹서버 설치하기 (V2.0)
www.mblog.kr



맥 OSX 에는 기본적으로 Apache2 가 설치되어 있어 설치가 필요하지 않다.
Homebrew 로 Apache 설치를 안내하는 블로그 포스트가 많은데, 동일한 패키지이므로 설치할 필요가 없다.


#1 설치된 Apache 버전 확인

$ apachectl -v
Server version: Apache/2.4.48 (Unix)
Server built: Aug 15 2021 22:57:12


#2 Apache 구동상태 확인 (브라우져에서 확인)

localhost/server-status
※ 별도 환경설정이 필요하다.


#3 Apache 실행하기 / 종료하기 / 재실행하기

$ sudo apachectl start
$ sudo apachectl stop
$ sudo apachectl graceful (재실행)
$ sudo apachectl restart (재실행)


#4 Apache 환경설정 (httpd.conf)

$ sudo vi /etc/apache2/httpd.conf


※ Apache 주요 환경설정 파일 및 위치
   ① private/etc/apache2/httpd.conf
   ② private/etc/apache2/extra/httpd-vhosts.conf
   ③ private/etc/apache2/extra/httpd-ssl-conf





# 기타 참고사항

1. Apache HTTP Server는 오픈 소스 소프트웨어 그룹인 아파치 소프트웨어 재단에서 만드는 웹 서버 프로그램이다.
2. 팀 버너스 리가 만든 최초의 웹 서버 프로그램인 "NCSA HTTPd"를 기반으로 만들어졌다.
3. 최근까지는 Apache가  Active Server 점유율에서 항상 1위 였으나, 2019년부터 Nginx 가 1위로 오르면서 순위가 역전되었다.