开发者

Subversion (svn) integration with Apache?

I am running a website on my server with Apache, and I have also setup SVN with Apache.

The problem arises when I make changes in httpd.conf to setup SVN and restart Apache. It 开发者_开发技巧starts to serve files as SVN, but it stops my website. Then every user can see my source code.

I want to make my server as development server and production server. How can I run Apache for SVN and host my website?


First install dav svn:

apt-get install libapache2-svn

root@example:/var# mkdir svn
root@example:/var# cd svn
root@example:/var/svn# svnadmin create repo

a2enmod dav_svn

Change permissions for Apache:

chown -R root.www-data /var/svn
chmod -R g+rw /var/svn

Add the repository to a virtual host

<Location /svn/myrepo>
  DAV svn
  SVNPath /var/svn/repo

  AuthType Basic
  AuthName "My Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd

  Require valid-user
</Location>

htpasswd2 /etc/apache2/dav_svn.passw user
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜