ã•ãらVPSã§WebDAVã—ã¦ã¿ã‚‹
以下ã®æ‰‹é †ã§ç¹‹ãŒã‚Šã¾ã›ã‚“ã§ã—ãŸã€‚
ãªã‚“ã§ï½ž
å‚考:
http://www.kyoji-kuzunoha.com/2012/04/webdavwindows7windows7.html
*関係ãªã„ã‘ã©.bashrcã®å†…容追åŠ
export TZ='Asia/Tokyo'
export EDITOR=vim
export PS1="\n[\u@\h] \w\n\$ "
alias vi=vim
alias ls='ls -GF'
*LANGã®ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆå¤‰ãˆã¦ãŠã
$ sudo cp /etc/sysconfig/i18n /etc/sysconfig/i18n.org
$ sudo vi /etc/sysconfig/i18n
$ diff /etc/sysconfig/i18n /etc/sysconfig/i18n.org
1c1
< LANG="en_US.UTF-8"
---
> LANG="C"
*dav用ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªä½œã£ã¦ãŠã
$ sudo mkdir /var/www/music && sudo chmod 777 /var/www/music
※ èªè¨¼ã‚’用ã„ã¦å®¶æ—ã®ä½¿ç”¨ã™ã‚‹ãƒ‡ãƒã‚¤ã‚¹ã®é–“ã§éŸ³æ¥½ãƒ‡ãƒ¼ã‚¿ã‚’共有ã™ã‚‹ãŸã‚ã®ã‚‚ã®ã§ã‚ã‚Šã€é•æ³•ã‚³ãƒ”ーを助長ã™ã‚‹ç›®çš„ã§ã¯ã‚ã‚Šã¾ã›ã‚“
*èªè¨¼ãƒ•ã‚¡ã‚¤ãƒ«ä½œæˆ
$ htpasswd -c /var/www/htpasswd/music music
New password:
Re-type new password:
Adding password for user music
*秘密éµã®ä½œæˆ
$ cd /etc/pki/tls/certs
$ sudo make server.key
Enter pass phrase:
Verifying - Enter pass phrase:
$ sudo openssl rsa -in server.key -out server.key
Enter pass phrase for server.key:
writing RSA key
$ sudo make /etc/pki/tls/certs/server.csr
Country Name (2 letter code) [XX]:JP
State or Province Name (full name) :
Locality Name (eg, city) [Default City]:
Organization Name (eg, company) [Default Company Ltd]:
Organizational Unit Name (eg, section) :
Common Name (eg, your name or your server's hostname) :example.jp
Email Address :info@example.jp
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password :
An optional company name :
*SSL証明書を作æˆ
$ sudo openssl x509 -in server.csr -out server.pem -req -signkey server.key -days 3650
$ sudo chmod 600 server.key server.csr server.pem
*apacheã§ssl利用å¯èƒ½ã«ã™ã‚‹
$ sudo yum -y install mod_ssl
$ sudo cp /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.org
$ diff /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl
.conf.org
77c77
< DocumentRoot "/var/www/html"
---
> #DocumentRoot "/var/www/html"
105c105
< SSLCertificateFile /etc/pki/tls/certs/server.pem
---
> SSLCertificateFile /etc/pki/tls/certs/localhost.crt
112c112
< SSLCertificateKeyFile /etc/pki/tls/certs/server.key
---
> SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
* WevDAVã‚’è¨å®š
$ sudo vi /etc/httpd/conf.d/webdav.conf
$ cat /etc/httpd/conf.d/webdav.conf
Alias /music/ "/var/www/music/"
<IfModule mod_dav.c>
<Location /music>
Dav on
EnableSendfile on
SSLRequireSSL
AuthType Basic
AuthName "example.jp music"
AuthUserFile "/var/www/htpasswd/music"
Require valid-user
</Location>
</IfModule>
$ sudo service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
$ echo OK > /var/www/music/index.html
* Windows7ã‹ã‚‰WebDAVã«ã¤ãªã
IEã§DAVフォルダã«ã‚¢ã‚¯ã‚»ã‚¹ã—ã¦ä¿¡é ¼ã•ã‚ŒãŸãƒ«ãƒ¼ãƒˆè¨¼æ˜Žæ›¸ã¨ã—ã¦ã‚¤ãƒ³ãƒãƒ¼ãƒˆã—ã¦ã—ã¾ã†
(一時的ã«ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã‚ªãƒ—ションã§ä¿è·ãƒ¢ãƒ¼ãƒ‰ã®è§£é™¤ãŒå¿…è¦ï¼‰
ãã®å¾Œã€ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ‰ãƒ©ã‚¤ãƒ–ã®å‰²ã‚Šå½“ã¦ã‚’ã™ã‚‹