אובונטו: הגדרת שרת WebDAV - איך הוא עובד
אתה יכול בקלות להגדיר שרת WebDAV בשרת אובונטו. בטיפ המעשי הזה, נראה לך בדיוק כיצד לעשות זאת.
הגדר שרת WebDAV באובונטו - כך שהוא יעבוד
- התחבר לשרת לינוקס באמצעות SSH והזן את הפקודה "sudo a2enmod dav sudo a2enmod dav_fs" ואשר את הכניסה באמצעות [Enter].
- הספרייה המתאימה ל- WebDAV נוצרת באמצעות "sudo mkdir / var / webdav". אז אתה צריך להשתמש ב "sudo chown -R www-data: www-data / var / webdav" כדי להתאים את זכויות הגישה לתיקיה.
- כעת יש צורך בכמה שינויים בעורך. טען את הקובץ בהתאמה עם הפקודה "sudo nano / etc / apache2 / sites-enabled / 000-default.conf" לעורך והוסף את השורות הבאות דרך "Virtual Horst": "אפשרויות אינדקסים MultiViews AllowOrride None Order allow "דחה את היתר מכל".
- כעת ערכו פסקה והוסיפו עוד אחת: "כינוי / webdav / var / webdav / DAV על אפשרויות + אינדקסים AuthType Basic AuthName DAV AuthUserFile / etc / apache2 / webdav דרוש משתמש חוקי". השינויים נשמרים בשילוב המקשים [Ctrl] + [O]. לחץ על [Ctrl] + [X] כדי לצאת מהעורך.
- למען האבטחה, עליך ליצור משתמש נפרד עבור WebDAV. אתה יכול לעשות זאת באמצעות "sudo htpasswd-c / etc / apache2 / webdav name". התאם אישית את "שם" עם שם המשתמש הרצוי. לאחר מכן עליך להזין את הסיסמה המתאימה פעמיים.
שלבים נוספים: הגדר את שרת WebDAV באובונטו
- מסיבות אבטחה, אנו ממליצים להצפין את שרת WebDAV שלך, אחרת התוכן יועבר ללא הגנה.
- SSL מתאים להליך זה. טען את עצמך עם הפקודה "openssl genrsa -out /etc/ssl/private/apache.key 2048 openssl req -new -x509 -key /etc/ssl/private/apache.key-ימים 365-sh256 -out / וכו '/ ssl / certs / apache.crt "תעודת ה- SSL המתאימה לשרת שלך.
- על מנת שהצפנה תפעל, עליך להפעיל את פונקציית SSL באמצעות הפקודה "sudo a2enmod ssl".
- כעת בצע גיבוי של הקובץ "/ etc / apache2 / sites-available / 000-default.conf". ואז פתח אותו באמצעות "nano / etc / apache2 / sitesavailable / webdav-ssl.conf" והתאם את הערך "" "ל-" ".
- למטה עליך להוסיף "SSLEngine on SSLCertificateFile / etc / ssl / certs / apache.crt SSLCertificateKeyFile /etc/ssl/private/apache.key" כך שההצפנה מוחלת.
- לבסוף, הפעל מחדש את שרת האינטרנט שלך באמצעות "sudo service apache2 restart". לאחר מכן המכשיר מחובר.
בטיפ המעשי הבא שלנו, נראה לך כיצד להשתמש ב- WebDAV באנדרואיד.