Configuration of apache+svn under Ubuntu

 

To install apache, enter the following command in the command line terminal:

$ sudo apt-get install apache2

If the installation fails, execute the following command and then install

sudo apt-get upgrade,sudo apt-get  update

 

Modify Apache port

  1. sudo vi /etc/apache2/ports.conf  

Change the port in the configuration file to the port you want

 

then start apache

  service apache2 start

 

access apache

http://ip:port/

 

Next, configure the mapping between svn and apache. If there is no dav_svn.conf file in the /etc/apache2/mods-available directory, you need to execute it first

sudo apt-get install subversion libapache2-svn 

 

 Configure the apache service and add the following configuration to /etc/apache2/mods-available/dav_svn.conf

<Location /svn>

  DAV svn

  #SVNPath /var/lib/svn

  SVNParentPath /opt/svn

  AuthType Basic

  AuthName "Subversion Repository"

  AuthUserFile /etc/apache2/dav_svn.passwd

  # To enable authorization via mod_authz_svn (enable that module separately):

  <LimitExcept GET PROPFIND OPTIONS REPORT>

    Require valid-user

  </LimitExcept> 

</Location>

generate dav_svn.passwd

  1. sudo htpasswd -c /etc/subversion/passwd user_name (-c creates file)
  2. sudo htpasswd /etc/subversion/passwd other_user_name  

restart apache 

   

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326510991&siteId=291194637