Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CentOS 7 WebDav Script
- --------------------------------
- yum install epel-release
- yum update -y
- yum install httpd
- sed -i ' s/^/#& /g' /etc/httpd/conf.d/welcome.conf
- sed -i " s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf
- systemctl start httpd.service
- systemctl enable httpd.service
- httpd -M | grep dav
- mkdir /var/www/html/webdav
- chown -R apache:apache /var/www/html
- chmod -R 755 /var/www/html
- htpasswd -c /etc/httpd/.htpasswd username
- chown root:apache /etc/httpd/.htpasswd
- chmod 640 /etc/httpd/.htpasswd
- vi /etc/httpd/conf.d/webdav.conf
- ...
- DavLockDB /var/www/html/DavLock
- <VirtualHost *:80>
- ServerAdmin webmaster@localhost
- DocumentRoot /var/www/html/webdav/
- ErrorLog /var/log/httpd/error.log
- CustomLog /var/log/httpd/access.log combined
- Alias /webdav /var/www/html/webdav
- <Directory /var/www/html/webdav>
- DAV On
- AuthType Basic
- AuthName "webdav"
- AuthUserFile /etc/httpd/.htpasswd
- Require valid-user
- </Directory>
- </VirtualHost>
- ...
- systemctl restart httpd.service
- *Access to WebDAV on Linux local machine *
- sudo apt install -y davfs2
- sudo mount -t davfs https://localhost/webdav /mnt
- or
- aptitude install cadaver
- cadaver https://localhost/webdav
- Also, can install Dolphin file mananger for work in graphic interface:
- sudo apt-get install dolphin
- webdav://localhost/webdav/
Advertisement
Add Comment
Please, Sign In to add comment