Debian8 apache2.4.x deploy mysql-authorized subversion

Source: Internet
Author: User

Debian8 apache2.4.x deploy mysql-authorized subversion
Recently, you need to migrate an old server with the mysql-authorized subverison application under apache2.2. Then we made a research.
In the past, apache2 configuration was unavailable, mainly because the modules used for mysql authentication in apache2.4.x and apache2.2.x were greatly changed. In the past, it was the auth_mysql module. This module has expired in apache2.4.x and needs to be replaced by the authn_dbd and authz_dbd modules. The corresponding configuration also needs to be modified.
The settings are described below.
Environment: debian8u2. All packages are installed using apt-get.
-------------------------------------------------------------
Install the required software package. Note that this article does not involve the setup of the mysql service and considers that the mysql service has been set up (either local or other server hosts ).

 
 
  1. apt-get install apache2 libapache2-mod-svn mysql-client libaprutil1-dbd-mysql
Set the related modules of apache2 load (note that some modules have been automatically loaded when installing the libapache2-mod-svn, otherwise you need to add dav_svn.load and dav_svn.conf), the following modules are mainly using the database for authentication.
 
 
  1. a2enmod auth*_dbd dbd
Modify a host configuration of apache2 to complete subversion authentication access.
The following is an example.
 
 

  1. ...
  2. # Basic database access configuration
  3. # Database mode
  4. DBDriver mysql
  5. # Database access connection information, which should be configured according to the actual situation. The host is the database service host, the port corresponds to the Service port, the dbname corresponds to the database to be accessed, and the user is the access user name, pass is the access password (the password is in plaintext)
  6. DBDParams "host = 192.168.1.150 port = 3306 dbname = svnauth user = authuser pass = dbpasswd"
  7. DBDMin 4
  8. DBDKeep 8
  9. DBDMax 20
  10. DBDExptime 300
  11. # Configuration of a subversion Project

  12. # Configure the subversion repository to be accessed using DAV
  13. DAV svn
  14. # Place the data in the repository. Note that the FSFS data structure is used.
  15. SVNPath/var/svnlibs/svnprj
  16. # A parsing XSLT data definition that is referenced in the browser (relative to the web path)
  17. SVNIndexXSLT/svnindex. xsl
  18. SVNAutoversioning on
  19. AuthName "Svnprj MySql"
  20. AuthType Basic
  21. # The authentication method is dbd, that is, database
  22. AuthBasicProvider dbd
  23. Require valid-user
  24. # Modify the user query statement according to the actual situation. The table name is users, the username field is user_name, and the user password field is user_passwd.
  25. AuthDBDUserPWQuery "SELECT user_passwd FROM users WHERE user_name = % s"

  26. # Enable Read Permission for Authenticated Users

  27. # User group permission Configuration
  28. # Database query for user groups
  29. Require dbd-group work
  30. # Modify the user group query statement according to the actual situation. The table name is groups, the username field is user_name, and the user group field is user_group.
  31. AuthzDBDQuery "SELECT user_group FROM groups WHERE user_name = % s"


  32. # Permission configuration for individual users
  33. Require user auser


  34. Require valid-user


  35. ...
So far, the configuration of an apache2.4 that supports mysql authentication is complete after it is integrated with the subversion repository service. This is the configuration of a repository. to configure multiple repositories, you only need

 
 
  1. SVNPath /var/svnlibs/svnprj
Change
 
 
  1. # Specify the parent directory of multiple warehouses
  2. SVNParentPath/var/svnlibs
  3. SVNListParentPath on
You can.







Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.