0015.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Setting Up Apache Subversion on Windows</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="How To Host Apache Subversion On Windows,Apache,Subversion,Source Code,Apache HTTPD Administration,Self-Hosted,Code Repository,Source Code Tracking,Home Lab,Install Guide,Web Developer,Apache HTTPD,SVN Basics,SVN Server,Repository,Source Control,SVN,System Administrator,Apache HTTPD Config,Web Server Administration,Web Server,HTTPD,TortoiseSVN,Version Control,Self-hosted,Apache Subversion,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Setting Up Apache Subversion on Windows">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="03/25/2022 03:26:17 PM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Setting Up Apache Subversion on Windows</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>Installing Subversion</h2>
  26. <ol>
  27. <li>Download Microsoft Visual C++<a href="https://aka.ms/vs/16/release/vc_redist.x64.exe" target="_blank">Download</a></li>
  28. <li>Download TortoiseSVN <a href="https://tortoisesvn.net/downloads.html" target="_blank">Download</a></li>
  29. <li>Install Microsoft Visual C++</li>
  30. <li>Install TortoiseSVN, making sure to enable the command line client tools option</li>
  31. </ol>
  32. <h2>Installing and Configuring Apache HTTPD</h2>
  33. <ol>
  34. <li>Download Apache HTTPD <a href="https://www.apachelounge.com/download/" target="_blank">Download</a></li>
  35. <li>Download Subversion Apache Modules <a href="https://github.com/nono303/win-svn/tree/1.14.0" target="_blank">Download</a></li>
  36. <li>Extract the downloaded .zip files</li>
  37. <li>Copy the extracted Subversion files to the desired location, for example C:\Program Files\Subversion</li>
  38. <li>Click the Start button &gt; Search Control &gt; Click Control Panel</li>
  39. <li>Click on System &gt; Advanced system settings</li>
  40. <li>Click the Environment Variables...</li>
  41. <li>Edit the System Path variable</li>
  42. <li>Add the Subversion /bin path</li>
  43. <li>Click OK</li>
  44. <li>Open a command prompt and run svn --version to confirm the Subversion executables are configured in the system path correctly</li>
  45. <li>Copy the following files from the extracted Subversion directory to the Apache installation directory specified below:
  46. <p><u>Apache /modules</u><br />
  47. mod_dav_svn.so<br />
  48. mod_authz_svn.so<br />
  49. deps/brotlicommon.dll<br />
  50. deps/brotlidec.dll<br />
  51. deps/brotlienc.dll<br />
  52. deps/libapr-1.dll<br />
  53. deps/libapriconv-1.dll<br />
  54. deps/libaprutil-1.dll<br />
  55. deps/libcrypto-1_1-x64.dll<br />
  56. deps/libexpat.dll<br />
  57. deps/libhttpd.dll<br />
  58. deps/libserf-2.dll<br />
  59. deps/libssl-1_1-x64.dll<br />
  60. deps/zlib1.dll<br />
  61. <u>Apache /bin</u><br />
  62. libsvnjavahl-1.dll<br />
  63. libsvn_client-1.dll<br />
  64. libsvn_delta-1.dll<br />
  65. libsvn_diff-1.dll<br />
  66. libsvn_fs-1.dll<br />
  67. libsvn_fs_fs-1.dll<br />
  68. libsvn_fs_util-1.dll<br />
  69. libsvn_fs_x-1.dll<br />
  70. libsvn_ra-1.dll<br />
  71. libsvn_repos-1.dll<br />
  72. libsvn_subr-1.dll<br />
  73. libsvn_wc-1.dll</p>
  74. </li>
  75. <li>Inside the extracted Apache file structure, navigate to /conf/httpd.conf and edit it with a text editor</li>
  76. <li>Find the following lines LoadModule dav_module modules/mod_dav.so and uncomment them by removing the # at the beginning
  77. <p>LoadModule access_compat_module modules/mod_access_compat.so<br />
  78. LoadModule dav_module modules/mod_dav.so</p>
  79. </li>
  80. <li>Add the following block to the file:
  81. <p>LoadModule dav_svn_module modules/mod_dav_svn.so<br />
  82. LoadModule authz_svn_module modules/mod_authz_svn.so</p>
  83. <p>&lt;VirtualHost svn.i12bretro.local:80&gt;<br />
  84. ServerName svn.i12bretro.local<br />
  85. ServerAlias i12bretro.local<br />
  86. DocumentRoot E:\SVN_Repos<br />
  87. <br />
  88. &lt;Location /&gt;<br />
  89. DAV svn<br />
  90. SVNListParentPath On<br />
  91. SVNParentPath E:\SVN_Repos<br />
  92. <br />
  93. Order allow,deny<br />
  94. Allow from all<br />
  95. &lt;/Location&gt;<br />
  96. &lt;/VirtualHost&gt;</p>
  97. </li>
  98. <li>Save the changes</li>
  99. <li>To just start Apache and have it run, double click the httpd.exe in the Apache /bin directory</li>
  100. <li>To run Apache as a Windows server, hold the shift key and right click in the Apache /bin directory &gt; Open command window here</li>
  101. <li>Enter the following command to create the Apache service:
  102. <div class="codeBlock">httpd.exe -k install -n &quot;Apache HTTPD&quot;</div>
  103. </li>
  104. <li>Open a web browser and navigate to http://svn.i12bretro.local</li>
  105. <li>A bare bones directory listing of the &quot;Collection of Repositories&quot; should be displayed</li>
  106. </ol>
  107. <h2>Setting Up LDAP Authentication</h2>
  108. <ol>
  109. <li>Navigate to the Apache install directory/conf in Explorer</li>
  110. <li>Edit httpd.conf in a text editor</li>
  111. <li>Find both the authnz_ldap_module and ldap_module and make sure it is enabled by removing the # at the start of the line
  112. <p>LoadModule authnz_ldap_module modules/mod_authnz_ldap.so<br />
  113. LoadModule ldap_module modules/mod_ldap.so</p>
  114. </li>
  115. <li>Add the following to the Location block created earlier for svn.i12bretro.local to enable LDAP authentication
  116. <p> Order deny,allow<br />
  117. # Basic authentication with LDAP against MS AD<br />
  118. AuthType Basic<br />
  119. AuthBasicProvider ldap<br />
  120. <br />
  121. # AuthLDAPURL specifies the LDAP server IP, port, base DN, scope and filter<br />
  122. # using this format: ldap://host:port/basedn?attribute?scope?filter<br />
  123. AuthLDAPURL &quot;ldap://i12bretro.local:389/DC=i12bretro,DC=local?sAMAccountName?sub?(objectClass=user)&quot; NONE<br />
  124. <br />
  125. # The LDAP bind username and password<br />
  126. AuthLDAPBindDN &quot;readonly_svc@i12bretro.local&quot;<br />
  127. AuthLDAPBindPassword &quot;Read0nly!!&quot;<br />
  128. LDAPReferrals Off<br />
  129. AuthUserFile /dev/null<br />
  130. <br />
  131. AuthName &quot;Restricted Area [i12bretro.local]&quot;<br />
  132. # to authenticate a domain group, specify the full DN<br />
  133. AuthLDAPGroupAttributeIsDN on<br />
  134. require ldap-group CN=WebAuthAccess,CN=Users,DC=i12bretro,DC=local</p>
  135. </li>
  136. <li>Save httpd.conf</li>
  137. <li>Restart the Apache service</li>
  138. <li>Open a web browser and navigate back to http://svn.i12bretro.local</li>
  139. <li>An authentication prompt should be displayed</li>
  140. <li>Enter a valid username and password for a user belonging to the group specified above</li>
  141. <li>A bare bones directory listing of the Subversion repositories should be displayed</li>
  142. </ol>
  143. </div>
  144. </div>
  145. </body>
  146. </html>