1. Modifying the Apache configuration file
Because I was optimizing the Apache configuration file when I was installing and configuring SVN, I wrote all the configuration about SVN in/opt/apache2/conf/extra/httpd-svn.conf, and then the master configuration file/opt/ Apache2/conf/httpd.conf is called by the include conf/extra/httpd-svn.conf method.
Therefore, I need to change here is the/opt/apache2/conf/extra/httpd-svn.conf file, add the following (where the 1,2,6 line, please modify according to the actual situation):
Alias/svntools "/opt/apache2/htdocs/svntools" <directory "/opt/apache2/htdocs/svntools" >Require Valid-userauthtype basicauthname "Gridteam's Subversion Tools" AuthUserFile "/opt/subversion/conf/svn_passwdfile" </Directory>
2. Create a PHP page that modifies its own password
Mkdir/opt/apache2/htdocs/svntools
Cd/opt/apache2/htdocs/svntools
Vim svnpass.php
Enter the following (where line 135,136 is modified according to the actual situation):
< $username = $_server["Php_auth_user"]; AuthType Basic Certified user name $authed_pass = $_server["PHP_AUTH_PW"]; AuthType Basic Certified Password $input_oldpass = (isset ($_request["Oldpass"])? $_request["Oldpass"]: ""); The original password entered from the interface $newpass = (isset ($_request["Newpass"])? $_request["Newpass"]: ""); The new password entered on the interface $repeatpass = (isset ($_request["Repeatpass"])? $_request["Repeatpass"]: ""); Duplicate password entered on the interface $action = (Isset ($_request["action"])? $_request["Action"]: ""); The actionif ($action! = "Modify") that was submitted to the server in hide mode {$action = "view";} else if ($authed _pass!= $input _oldpass) {$action = "Oldpasswrong";} else if (empty ($newpass)) {$action = "passempty";} else if ($newpass! = $repeatpass) {$action = "passnotsame";} else{$action = "Modify";}? >