UBUNTU11 Subversion Virtual host 사용하는 경우 sites-available 설정

less than 1 minute read

svn.도메인.com을 주소로 한다고 가정하고 설명한다.

우분투 기본설치 경로인

/etc/apache2/sites-available에서

 

$ sudo cp default svn

$ sudo gedit svn

편집 후

$ sudo a2ensite svn

$ sudo /etc/init.d/apache2 restart

완료… 간단하다. VirtualHost 사용해본분들은 쉽게 할 수 있을듯…

그냥 밑에 //////////////로 둘러싼 부분을 끼워넣으면 된다.

주석 #로 된 부분을 해제하면 svn.도메인.com/svn/OpenRepository로 OpenRepository에 접속이 된다.

 

<VirtualHost *:80> ServerAdmin webmaster@localhost //////////////////////////// ServerName svn.도메인.com #<Location /svn/OpenRepository> (이 부분의 주석을 해제하면 svn.도메인.com/svn/OpenRepository로 접속이 된다) #    DAV svn #    SVNPath /home/svn/OpenRepository #    AuthType Basic #    AuthName “Welcome  Open Subversion Repository” #</Location> #<Location /svn/repository> ( svn.도메인.com/으로 접속이 된다는 소리… ‘/Secure’이라고 해놓으면 svn.도메인.com/Secure’으로 접속할 수 있게된다)

DAV svn SVNPath /home/svn/repository AuthType Basic AuthName “Welcome Secure Subversion Repository” AuthUserFile /etc/subversion/passwd Require valid-user </Location> //////////////////////////////////////// #    DocumentRoot /home/itvader/www Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory “/usr/lib/cgi-bin”> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ “/usr/share/doc/” <Directory “/usr/share/doc/”> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory>

</VirtualHost>