Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:services:nas:webdav [2023/01/20 13:48] – [Browser UI for the WebDAV share] stokito | docs:guide-user:services:nas:webdav [2024/12/15 13:03] – [ZeroConf autodiscovery] stokito | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| ==== WebDAV with Lighttpd ==== | ==== WebDAV with Lighttpd ==== | ||
| - | Assuming that USB drive is mounted to ''/ | + | First of all if you already have the Lighttpd then update it and it's modules to avoid conflicts: |
| + | <code bash> | ||
| + | opkg update | ||
| + | opkg list-upgradable | cut -f 1 -d ' ' | grep lighttpd | xargs opkg upgrade | ||
| + | </ | ||
| + | |||
| + | Assuming that USB drive is mounted to ''/ | ||
| <code bash> | <code bash> | ||
| - | mkdir -p / | + | mkdir -p / |
| - | chown http: | + | chown http: |
| cat << " | cat << " | ||
| $HTTP[" | $HTTP[" | ||
| - | server.document-root := "/srv/ | + | server.document-root := "/mnt/ |
| auth.backend = " | auth.backend = " | ||
| auth.backend.plain.userfile = "/ | auth.backend.plain.userfile = "/ | ||
| Line 21: | Line 27: | ||
| "/ | "/ | ||
| ) | ) | ||
| + | auth.cache = (" | ||
| } | } | ||
| EOF | EOF | ||
| Line 54: | Line 61: | ||
| To connect to WebDAV see [[https:// | To connect to WebDAV see [[https:// | ||
| - | To test WebDAV from command line use '' | + | A quick test can be done with a '' |
| - | < | + | < |
| - | cadaver http:// | + | curl -u youruser:pass -X PROPFIND -H 'Depth: 1' |
| - | Authentication required for webdav on server `192.168.1.1': | + | |
| - | Username: | + | |
| - | Password: | + | |
| - | dav:/ | + | |
| - | Listing collection `/dav/': | + | |
| - | README.txt | + | |
| - | dav:/ | + | |
| - | Displaying `/ | + | |
| - | It works! | + | |
| - | dav:/dav/> exit | + | |
| - | Connection to `192.168.1.1' closed. | + | |
| </ | </ | ||
| + | You must see a 207 status code and XML response with directory listing. | ||
| - | If you don't want to install the cadaver you can test with a '' | + | See more details and examples [[https://gist.github.com/stokito/cf82ce965718ce87f36b78f7501d7940|WebDAV with curl]] |
| - | + | ||
| - | <code bash> | + | |
| - | curl -u youruser -X PROPFIND -H " | + | |
| - | </ | + | |
| ==== Don't forget about encryption! ==== | ==== Don't forget about encryption! ==== | ||
| Please note that you must configure HTTPS if you are going to access your files from internet. | Please note that you must configure HTTPS if you are going to access your files from internet. | ||
| - | See [[https:// | + | You'll need to [[docs: |
| ==== Browser UI for the WebDAV share ==== | ==== Browser UI for the WebDAV share ==== | ||
| - | To watch the share from a browser you can install the small and nice UI [[https:// | + | As with usual HTTP you can see (GET) any file directly |
| + | But you can install a [[https:// | ||
| + | |||
| + | But a better is to install the small and nice UI [[https:// | ||
| <code html> | <code html> | ||
| - | cat << EOF > / | ||
| < | < | ||
| <html lang=" | <html lang=" | ||
| Line 94: | Line 89: | ||
| </ | </ | ||
| < | < | ||
| - | <script src=" | + | <script src=" |
| </ | </ | ||
| </ | </ | ||
| - | EOF | ||
| </ | </ | ||
| - | Then open [[http:// | + | Then open [[http:// |
| The disadvantage of the method is that it's doesn' | The disadvantage of the method is that it's doesn' | ||
| That's fine for 99% of usages. | That's fine for 99% of usages. | ||
| - | You can also try an online apps that can connect directly to your WebDAV share. | + | ==== Online apps and PWAs ==== |
| + | You can also try an online apps that can connect directly to your WebDAV share to backup data. Some notable apps: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| - | You' | + | To allow online apps to connect with your WebDAV it need a CORS enabled. |
| Here is an example [[https:// | Here is an example [[https:// | ||
| + | |||
| + | ==== Useful Apps ==== | ||
| + | Useful mobile apps that supports WebDAV sync: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| ==== Links and docs ==== | ==== Links and docs ==== | ||
| Line 116: | Line 121: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| - | * [[https:// | + | * [[https:// |
| * [[https:// | * [[https:// | ||
| + | ==== ZeroConf autodiscovery ==== | ||
| + | You can advertise a WebDAV share with [[docs: | ||
| + | Then it will be seen in Network folder of a file manager in GNOME and KDE and can be [[https:// | ||
| + | |||
| + | Install the umdns package with '' | ||
| + | |||
| + | <code yaml / | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | The reload the umdns service with: '' | ||