Subversion
3
Вклад в тег
<VirtualHost *:80>
ServerName www.example.com
DocumentRoot /vhosts/www.example.com/public_html
DirectoryIndex index.html index.php
# Закрываем доступ к служебным папкам VCS
RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)
<Directory /vhosts/www.example.com/public_html>
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
# cd /vhosts/www.example.com/public_html
# svn co file:///var/lib/svn/repos/project1/trunk ./
# chown -R svn:apache /vhosts/www.example.com/public_html
# chmod -R 770 /vhosts/www.example.com/public_html
# id svn
uid=497(svn) gid=48(apache) groups=48(apache),497(svn)
# cat /var/lib/svn/repos/project1/hooks/post-commit
#!/bin/sh
umask 002
cd /vhosts/www.example.com/public_html && svn up