Ubuntu: Nastavitev strežnika WebDAV - kako deluje
Na strežniku Ubuntu lahko enostavno nastavite strežnik WebDAV. V tem praktičnem nasvetu vam bomo natančno pokazali, kako to storiti.
V Ubuntu nastavite strežnik WebDAV - tako bo deloval
- Prijavite se na strežnik Linux s SSH in vnesite ukaz "sudo a2enmod dav sudo a2enmod dav_fs" in vnos potrdite z [Enter].
- Ustrezen imenik za WebDAV je ustvarjen z uporabo "sudo mkdir / var / webdav". Nato morate za prilagoditev pravic dostopa do mape uporabiti "sudo chown -R www-data: www-data / var / webdav".
- Zdaj so potrebne nekatere spremembe v urejevalniku. V urejevalnik naložite ustrezno datoteko z ukazom "sudo nano / etc / apache2 / sites-enable / 000-default.conf" in dodajte naslednje vrstice prek "Virtual Horst": "Options Indexes MultiViews AllowOverride None Order ne dovoli "Zavrni dovoljenje od vseh".
- Zdaj naredite odstavek in dodajte še enega: "Alias / webdav / var / webdav / DAV v Možnosti + Indeksi AuthType Basic AuthName DAV AuthUserFile / etc / apache2 / webdav Zahtevaj veljavnega uporabnika". Spremembe se shranijo s kombinacijo tipk [Ctrl] + [O]. Nato pritisnite [Ctrl] + [X] za izhod iz urejevalnika.
- Zaradi varnosti bi morali ustvariti ločenega uporabnika za WebDAV. To lahko storite z "sudo htpasswd -c / etc / apache2 / webdav name". Prilagodite "Ime" z želenim uporabniškim imenom. Nato morate dvakrat vnesti ustrezno geslo.
Nadaljnji koraki: Nastavitev strežnika WebDAV v Ubuntu
- Iz varnostnih razlogov priporočamo, da šifrirate strežnik WebDAV, sicer bo vsebina prenesena nezaščitena.
- SSL je primeren za ta postopek. Naložite se z ukazom "openssl genrsa -out /etc/ssl/private/apache.key 2048 openssl req -new -x509 -key /etc/ssl/private/apache.key -days 365 -sha256 -out / itd / ssl / certs / apache.crt "SSL certifikat, primeren za vaš strežnik.
- Da bi šifriranje delovalo, morate aktivirati funkcijo SSL z ukazom "sudo a2enmod ssl".
- Zdaj naredite varnostno kopijo datoteke "/ etc / apache2 / sites-available / 000-default.conf". Nato ga odprite z "nano / etc / apache2 / sitesavailable / webdav-ssl.conf" in prilagodite vnos "" "na" ".
- Spodaj morate dodati tudi "SSLEngine v SSLCertificateFile / etc / ssl / certs / apache.crt SSLCertificateKeyFile /etc/ssl/private/apache.key", tako da bo uporabljeno šifriranje.
- Končno znova zaženite spletni strežnik s "sudo service apache2 restart". Naprava je nato povezana.
V naslednjem praktičnem nasvetu vam bomo pokazali, kako lahko uporabljate WebDAV v Androidu.