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/02/28 13:23] – [ZeroConf autodiscovery] 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 58: | Line 64: | ||
| <code bash> | <code bash> | ||
| - | curl -u youruser -X PROPFIND -H "Depth: 1" | + | curl -u youruser:pass -X PROPFIND -H 'Depth: 1' |
| </ | </ | ||
| You must see a 207 status code and XML response with directory listing. | You must see a 207 status code and XML response with directory listing. | ||
| - | + | See more details and examples [[https://gist.github.com/stokito/cf82ce965718ce87f36b78f7501d7940|WebDAV with curl]] | |
| - | For advanced test install the FTP-like command line client '' | + | |
| - | + | ||
| - | < | + | |
| - | cadaver http://192.168.1.1/dav/ | + | |
| - | Authentication required for webdav on server `192.168.1.1': | + | |
| - | Username: youruser | + | |
| - | Password: | + | |
| - | dav:/ | + | |
| - | Listing collection `/ | + | |
| - | README.txt | + | |
| - | dav:/ | + | |
| - | Displaying `/ | + | |
| - | It works! | + | |
| - | dav:/ | + | |
| - | Connection to `192.168.1.1' | + | |
| - | </code> | + | |
| ==== Don't forget about encryption! ==== | ==== Don't forget about encryption! ==== | ||
| Line 86: | Line 75: | ||
| ==== 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 98: | 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. | ||
| - | == Online apps and PWAs == | + | ==== 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: | You can also try an online apps that can connect directly to your WebDAV share to backup data. Some notable apps: | ||
| * [[https:// | * [[https:// | ||
| Line 119: | Line 109: | ||
| Here is an example [[https:// | Here is an example [[https:// | ||
| - | == Useful Apps == | + | ==== Useful Apps ==== |
| Useful mobile apps that supports WebDAV sync: | Useful mobile apps that supports WebDAV sync: | ||
| - | * [[https:// | + | * [[https:// |
| - | * [[https:// | + | * [[https:// |
| + | * [[https:// | ||
| + | * [[https:// | ||
| Line 129: | Line 121: | ||
| * [[https:// | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| - | * [[https:// | + | * [[https:// |
| * [[https:// | * [[https:// | ||
| Line 136: | Line 128: | ||
| Then it will be seen in Network folder of a file manager in GNOME and KDE and can be [[https:// | 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 '' | + | Install the umdns package with '' |
| - | Create | + | |
| - | < | + | < |
| { | { | ||
| " | " | ||
| Line 145: | Line 136: | ||
| " | " | ||
| " | " | ||
| - | " | + | " |
| + | " | ||
| ] | ] | ||
| } | } | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | The reload the umdns service with: '' | ||