てきとうにだらだら書いていくと思う
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
sudo chmod -R 755 /media/mount次に
sudo chown -R www-data:www-data /media/mount/
cd /etc/apache2(・∀・)?
sudo apt-get updateとりあえずWevDavモジュールの起動とか
sudo apt-get install apache2
sudo a2enmod davもしraspbianで上のコマンドが使えない場合はapache2をインストールしたらモジュールも入る
sudo a2enmod dav_fs
sudo nano /etc/ssl/openssl.cnf次は証明書保存する場所を作る&移動する
# This is OK for an SSL server.
# nsCertType = server
↓
# This is OK for an SSL server.
nsCertType = server# Some might want this also# nsCertType = sslCA, emailCA↓# Some might want this alsonsCertType = sslCA, emailCA
sudo mkdir /usr/local/certs認証局の生成
cd /usr/local/certs
sudo /usr/lib/ssl/misc/CA.pl -newca
※:のあと何も書いてないのは何も入力せずEnterCA certificate filename (or enter to create)Making CA certificate ...Generating a 2048 bit RSA private key..............................................................................................................+++......................................................+++writing new private key to './demoCA/private/cakey.pem'Enter PEM pass phrase:Verifying - Enter PEM pass phrase:-----You are about to be asked to enter information that will be incorporatedinto your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter '.', the field will be left blank.-----Country Name (2 letter code) [AU]:JPState or Province Name (full name) [Some-State]:TottoriLocality Name (eg, city) []:TottoriOrganization Name (eg, company) [Internet Widgits Pty Ltd]:Private_CAOrganizational Unit Name (eg, section) []:Common Name (e.g. server FQDN or YOUR name) []:satsuki.blog-sim.comEmail Address []:Please enter the following 'extra' attributesto be sent with your certificate requestA challenge password []:An optional company name []:Using configuration from /usr/lib/ssl/openssl.cnfEnter pass phrase for ./demoCA/private/cakey.pem:Check that the request matches the signatureSignature ok中略Write out database with 1 new entriesData Base Updated
sudo nano demoCA/ca-cert.srl証明書を生成する
sudo openssl x509 -CA ./demoCA/cacert.pem -CAkey ./demoCA/private/cakey.pem -CAserial ./demoCA/ca-cert.srl -req -days 3650 -in server.csr -out server.crtとりあえずこれで証明書などは完了
cd /etc/apache2/設定ファイルをいじる
sudo a2ensite default-ssl
sudo a2enmod ssl
sudo nano /etc/apache2/sites-enabled/default-ssl.confSSLCertificateFile
はじめAllow from allと書いていたのだがブラウザで権限がない的なエラーが出てしまったAlias /dav "/media/mount"<IfModule mod_dav.c>DAVMinTimeout 600<Location /dav>DAV OnOptions None Indexes#Allow from allRequire all granted</Location></IfModule>
sudo service apache2 restartにてapache2を再起動して完了
04 | 2024/05 | 06 |
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
COMMENT