WebDAV server setup on Ubuntu Linux
# lxc-clone -o xenial_lxc -n webdav1
# lxc-start -n webdav1 -d
# lxc-ls -f
$ sudo -i
# apt update
# apt upgrade
# apt install mc wget nano
# apt install apache2
# wget 127.0.0.1
# cd /var/www
# mkdir webdav
# chown www-data.www-data /var/www/webdav
# cd /etc/apache2/sites-available/
# cp 000-default.conf webdav.local.conf
# nano webdav.local.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Servername webdav.local
DocumentRoot /var/www/webdav
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webdav/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Сохранить.
# a2dissite 000-default.conf
# a2ensite webdav.local
# sh -c 'echo "Welcome from WebDAV.local" > /var/www/webdav/index.html'
# service apache2 reload
# a2enmod dav_fs
Considering dependency dav for dav_fs:
Enabling module dav.
Enabling module dav_fs.
# service apache2 restart
# mkdir /var/www/webdav/svn
# chown www-data.www-data /var/www/webdav/svn/
# mkdir /usr/local/apache2/
# htpasswd -c /usr/local/apache2/webdav.passwords user
# nano webdav.local.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Servername webdav.local
DocumentRoot /var/www/webdav
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webdav/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Alias /svn /var/www/webdav/svn
<Location /svn>
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache2/webdav.passwords
Require valid-user
</Location>
</VirtualHost>
# apt-get install cadaver
# cadaver http://localhost/svn
Authentication required for webdav on server `localhost':
Username: user
Password:
dav:/svn/> ls
http://blog.xsk.in/it/sozdanie-sobstvennogo-webdav-servera/435
# lxc-clone -o xenial_lxc -n webdav1
# lxc-start -n webdav1 -d
# lxc-ls -f
$ sudo -i
# apt update
# apt upgrade
# apt install mc wget nano
# apt install apache2
# wget 127.0.0.1
# cd /var/www
# mkdir webdav
# chown www-data.www-data /var/www/webdav
# cd /etc/apache2/sites-available/
# cp 000-default.conf webdav.local.conf
# nano webdav.local.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Servername webdav.local
DocumentRoot /var/www/webdav
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webdav/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Сохранить.
# a2dissite 000-default.conf
# a2ensite webdav.local
# sh -c 'echo "Welcome from WebDAV.local" > /var/www/webdav/index.html'
# service apache2 reload
# a2enmod dav_fs
Considering dependency dav for dav_fs:
Enabling module dav.
Enabling module dav_fs.
# service apache2 restart
# mkdir /var/www/webdav/svn
# chown www-data.www-data /var/www/webdav/svn/
# mkdir /usr/local/apache2/
# htpasswd -c /usr/local/apache2/webdav.passwords user
# nano webdav.local.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
Servername webdav.local
DocumentRoot /var/www/webdav
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/webdav/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Alias /svn /var/www/webdav/svn
<Location /svn>
DAV On
AuthType Basic
AuthName "webdav"
AuthUserFile /usr/local/apache2/webdav.passwords
Require valid-user
</Location>
</VirtualHost>
# apt-get install cadaver
# cadaver http://localhost/svn
Authentication required for webdav on server `localhost':
Username: user
Password:
dav:/svn/> ls
http://blog.xsk.in/it/sozdanie-sobstvennogo-webdav-servera/435
Комментариев нет:
Отправить комментарий