Ubuntu: apache

# print apache version
apache2 -v
# install module
sudo apt-get install libapache2-svn
# enable apache module
sudo a2enmod headers
sudo a2enmod dav_fs
sudo a2enmod dav_svn
# disable apache module
sudo a2dismod php5
# apache status
systemctl -l status apache2
# apache start
sudo systemctl start apache2
# apache restart
sudo systemctl restart apache2
# list apache modules
sudo apache2ctl -M
# configuration
# /etc/apache2/apache2.conf
ServerName adrhc.go.ro
# /etc/apache2/envvars
export APACHE_RUN_USER****
export APACHE_RUN_GROUP****
# /etc/apache2/sites-available/000-default.conf
<Location /svn>
        Header set X-UA-Compatible "IE=edge"
        DAV svn
        SVNParentPath /mnt/500GB/SVNRepoLinux
        SVNListParentPath on
        AuthName "Subversion repository"
        AuthType Basic
        AuthUserFile /********/apps/etc/basic.auth.apache.passwords.txt
        Require valid-user
        SVNPathAuthz on
        AuthzSVNAccessFile /********/apps/etc/svn-authz
        Header set Cache-Control "public,must-revalidate"
</Location>

# how to share a directory with DAV and apache 2.2.29
# win7 url: https://adrhc.go.ro/webdav/
# make sure WebClient windows service is started
DavLockDB /ffp/var/dav/DavLock
Alias /webdav /i-data/md0/seagate-ext4/DAV-shares
<Directory /i-data/md0/seagate-ext4/DAV-shares>
	Options -Indexes FollowSymLinks

	Order Allow,Deny
	Allow from all
	
	Dav On

	AuthType Basic
	AuthName "webdav"
	AuthUserFile "/ffp/etc/basic.auth.apache.passwords.txt"
	Require valid-user

#	<Limit MKCOL PUT DELETE LOCK UNLOCK COPY MOVE PROPPATCH>
#        Allow from all
#	</Limit>
	
#	<LimitExcept GET POST OPTIONS>
#		Require user adr
#	</LimitExcept>
</Directory>

# how to share a directory with DAV and apache 2.4
# win7 url: https://adrhc.go.ro/webdav/
# make sure WebClient windows service is started
Alias /webdav /********/Documents/DAV-shares
DavLockDB /var/tmp/DAV-shares-DavLockDB
<Directory "/********/Documents/DAV-shares">
	Options -Indexes +FollowSymLinks
	Require all granted
	Dav On

	AuthType Basic
	AuthName "NSA310 admin"
	AuthUserFile "/********/apps/etc/basic.auth.apache.passwords.txt"
</Directory>

# how to connect from win 7 to share dav directory:
# right-click on Network icon on desktop and choose "map network drive" menu
# fill in "Folder" field with "https://adrhc.go.ro/webdav/"
# check "Connect using different credentials"
# press Finish

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.