用 NGINX 配置一個 WebDAV Server
Published in
Nov 16, 2019
前言
- 用 NGINX 配置一個 WebDAV Server
- 使用者可透過帳號密碼登入存取指定資料夾
環境
GCP Instance Ubuntu 18.04 NGINX Root
安裝
開啟 gzip
頻寬有限, 機器速度較快, 開啟 gzip 讓 server 回覆的資料都先經過壓縮, 減少經由網路傳送的資料大小
/gzip_/: 尋找含有 /gzip_/
的行數 s/#\ //g: 將 #
替換成 空白
意思就是 uncomment 掉 gzip 啦
配置 WebDAV Server
建立檔案
配置檔案
建立使用者
- 輸入 user
印出使用者名稱, tee
會將使用者名稱印在螢幕上以及導入 /etc/nginx/.passwords.list 檔案, -a
= append
- 輸入密碼
使用 openssl passwd
的 -apr1 規則來將密碼明文變成密文, tee
印出加密後密碼以及導入 /etc/nginx/.passwords.list 檔案, -a
= append
大功告成!
Write Medium in Markdown? Try Markdium!