본문 바로가기
기타

macOS Sierra 에서 WebDAV 서버 활성화

by 앗사비 2017. 8. 1.
728x90

1. 아파치 시작

sudo apachectl start

2. 주석 제거

sudo vi /etc/apache2/httpd.conf

LoadModule dav_module libexec/apache2/mod_dav.so

LoadModule dav_fs_module libexec/apache2/mod_dav_fs.so

LoadModule dav_lock_module libexec/apache2/mod_dav_lock.so

#LoadModule userdir_module libexec/apache2/mod_userdir.so (유저홈 사용시에만)

LoadModule auth_digest_module libexec/apache2/mod_auth_digest.so

#Include /private/etc/apache2/extra/httpd-userdir.conf (유저홈 사용시에만)

Include /private/etc/apache2/extra/httpd-dav.conf


3. 옵션 조정

sudo vi /etc/apache2/extra/httpd-dav.conf 

DavLockDB "/Volumes/data/DavLock"

Alias /dav "/Volumes/data/test"

<Directory "/Volumes/data/test">

DAV On

AuthType Digest

AuthName "webdav"

AuthUserFile "/etc/apache2/users.password"

Require valid-user

</Directory>


3. 권한 부여

sudo chown -R www:www /Volumes/data/test

4. 계정 생성

sudo htdigest -c /etc/apache2/users.password webdav [유저]
sudo chgrp www /etc/apache2/users.password

5. 아파치 재시작

sudo apachectl graceful
728x90