Development/막-윈도그
[막:OSX] enable WebSharing on Mountian Lion/ 마운틴라이언에서 OSX에 포함된 apache2 올리기.
江多林
2013. 7. 1. 15:45
1 사용자이름 확인하기
whoami
--> irontop
2 /etc/apache2/users/irontop.conf 파일 생성
sudo vi /etc/apache2/users/irontop.conf
3 /etc/apache2/users/irontop.conf 에 포함할 내용
- 주의 아래 Directory 에서 irontop 부분은 위에서 확인해둔 whoami(사용자명)으로 바꾸야!!
<Directory "/Users/irontop/Sites/">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
4 아파치 기동
sudo apachectl start
5 시작할 때 함께 기동하도록 설정하기
sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool false
* 문제해결
- 방화벽이 설정된 경우 방화벽 경고창이 뜰 수 있음.
- 새로 생성한 파일 권한문제로 실행되지 않을 경우는 아래 command 를 참조.
sudo chown root:wheel /etc/apache2/users/*
sudo chmod 644 /etc/apache2/users/*
sudo apachectl restart
참조:
http://reviews.cnet.com/8301-13727_7-57481978-263/how-to-enable-web-sharing-in-os-x-mountain-lion/
참조링크 겁나 느리지만, 기다리면 뜹니다. :)