2012년 10월 6일 토요일

Mac OS Mountain Lion + apache

Mountain Lion 부터는 웹 공유 옵션이 없어졌다.
참고 : http://support.apple.com/kb/HT5230

하지만 apache 서버가 이미 OS 에 포함이 되어 있다.

참고: http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion

terminal 을 열고 아래 명령을 통해 apache 서버를 실행할 수 있다.
$ sudo apachectl start

설정 파일은 아래 위치에 있다.
/etc/apache2

기본 document 경로는 다음과 같다.
/Library/WebServer/Documents/

기존에 웹 공유를 사용했다면 /Users/사용자아이디/Sites 에 폴더가 지정이 되었을 것이다.
/etc/apache2/users/ 디렉토리에 사용자아이디.conf 파일을 생성하고 아래와 같이 저장한다.
<Directory "/Users/사용자아이디/Sites/">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

그리고 아파치를 재실행한다.
$ sudo apachectl restart

웹브라우저로 접속해 보자.
http://localhost:80/~사용자아이디

댓글 없음:

댓글 쓰기