WebDAVにてファイル転送を行ない、認証はOpenLDAPを使用します。
あらかじめこちらユーザーを一元管理 LDAPでOpenLDAPをインストールしておきます。

Apacheの再インストール

# ./configure --with-mpm=prefork --enable-rewrite --enable-ssl --enable-dav \
--with-ldap --enable-ldap --enable-authnz-ldap --with-included-apr
# make
# make install

WebDAVの設定

公開ディレクトリを作成し、Apacheの設定を変更

# mkdir /home/webdav
# chown nobody.nobody /home/webdav
# vi /usr/local/apache2/conf/httpd.conf

Include conf/extra/httpd-dav.conf

# vi /usr/local/apache2/conf/extra/httpd-dav.conf

DavLockDB "/usr/local/apache2/var/DavLock"
Alias /webdav "/home/webdav"

<Location "/webdav">
    Dav On

    Order Allow,Deny
    Allow from all
</Location>

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

mod_encodingのインストール

mod_encoding-20021209.tar.gz と mod_encoding.c.apache2.20040616 をダウンロードします
http://webdav.todo.gr.jp/

WebDAV以外で文字化けのトラブルもあるようなのでパッチも当てます

filemod_encoding-20021209.tar.gz
filemod_encoding.c.apache2.20040616
filemod_encoding.c-apache2.2-20060520.patch
# tar xvzf mod_encoding-20021209.tar.gz
# cp mod_encoding.c.apache2.20040616 mod_encoding-20021209/mod_encoding.c
# cd mod_encoding-20021209/lib/
# ./configure
# make
# make install
# cd ..
# patch -p0 < ../mod_encoding.c-apache2.2-20060520.patch
# ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-iconv-hook
# vi Makefile

#LIBS =  -liconv_hook
LIBS = -L/usr/local/lib -liconv_hook
#install-exec-local:
#        $(APXS) -i mod_encoding.so
install-exec-local:
        $(APXS) -i -a -n encoding mod_encoding.la

# make
# make install

mod_encodingの設定を追加

# vi /usr/local/apache2/conf/extra/httpd-dav.conf

EncodingEngine        on

SetServerEncoding     UTF-8

DefaultClientEncoding UTF-8 CP932 EUCJP-MS

AddClientEncoding "Microsoft .* DAV 1.1" ASCII CP932 UTF-8
AddClientEncoding "Microsoft .* DAV" UTF-8 CP932
AddClientEncoding "(Microsoft .* DAV $)" UTF-8 CP932
AddClientEncoding "(Microsoft .* DAV 1.1)" CP932 UTF-8
AddClientEncoding "Microsoft-WebDAV*" UTF-8 CP932
AddClientEncoding "RMA/*" CP932
AddClientEncoding "xdwin9x/" CP932
AddClientEncoding "cadaver/" UTF-8 EUCJP-MS
AddClientEncoding "Mozilla/" EUCJP-MS

Apache再起動

 # /etc/rc.d/init.d/httpd graceful

参考サイト

http://www.atmarkit.co.jp/flinux/rensai/apache2_07/apache07a.html


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS