
brew로 설치한 apache 설정
개요
macOS의 brew로 설치한 apache httpd를 개발에서 이용하기 쉽게 설정합니다.
http://localhost/
로 액세스하면 ~/Sites
디렉토리의 사용자 권한으로 편집할 수 있는 파일에 액세스 되도록 합니다.httpd.conf 편집
/usr/local/etc/httpd/httpd.conf
를 편집합니다. 각 어휘를 검색하여 해당 위치를 변경하십시오.포트 변경
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
Listen 80
DocumentRoot
DocumentRoot
와 그 직후의 Directory
의 디렉토리를 변경합니다.(아래를
ls -d ~/Sites
로 표시되는 디렉트로 변경합니다)# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Users/<user>/Sites"
<Directory "/Users/<user>/Sites">
<Directory ...>
의 AllowOverride
를 all
로 변경 #
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride All
mod_rewrite
#
를 제거하고 uncomment합니다.LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so
User & Group
사용자 및 그룹 이름 변경.
이제 사용자 권한으로 웹 게시 파일을 편집할 수 있습니다.
User <user>
Group staff
ServerName
서버 이름을 localhost로
ServerName localhost
이상으로 설정 완료입니다.
확인
apache를 다시 시작하고 http://localhost/에서 확인해 봅시다.
sudo apachectl -k restart
다음 웹 페이지가 표시됩니다. 1

관련
덧붙여서 iWeb 는 2011년에 개발 종료하고 있습니다... ↩