Subversion & Apache & Trac

Source: Internet
Author: User
Tags chmod php server php script svn

installation

sudo apt-get install subversion apache2 LIBAPACHE2-SVN

Add a group and www-data this Apache member into the group

sudo addgroup subversion sudo usermod-g subversion-a www-data

Create SVN warehouse

Cd/home sudo mkdir svn sudo chown-r www-data:subversion svn sudo chmod-r g+rws svn sudo svnadmin create/home/svn sudo Chmod-r 777/HOME/SVN

Configuring the Apache server

sudo vim/etc/apache2/mods-available/dav_svn.conf

Add the following:

<LOCATION/SVN > DAV svn svnpath/home/svn authtype Basic authname "Welcome to Subversion repository" authuserfile/ ETC/SUBVERSION/PASSWD #<limitexcept get PROPFIND OPTIONS report> Require valid-user #</limitexcept> </ Location>

If you need user password authentication every time a user logs on, please comment out <limitexcept get PROPFIND OPTIONS report> and </LimitExcept> two lines.

When you add the above content, you must restart the Apache 2 Web server, enter the following command:

Sudo/etc/init.d/apache2 restart

to add a new user:


First user

sudo htpasswd-c/etc/subversion/passwd rjying

The second user does not use the-C option, or it will overwrite the password file

sudo htpasswd-c/etc/subversion/passwd rjying1


user Self-modifying password:

Install the PHP server and modify the/etc/apache2/httpd.conf file

<location/> AuthName "Please input username and password" authtype Basic authuserfile/etc/subversion/passwd Requir E Valid-user </Location>

The PHP script is as follows:

? $username = $_server["Php_auth_user"]; After the AuthType Basic authentication 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"]: ""); The duplicate password entered on the interface $action = (Isset ($_request["action")? $_request["Action"]: ""); The action if ($action!= "Modify") that is submitted to the server in hide {$action = "view";} else if ($authed _pass!= $input _oldpass) {$action = " Oldpasswrong "; else if (empty ($newpass)) {$action = "passempty";} else if ($newpass!= $repeatpass) {$action = "passnotsame";} else{$act Ion = "Modify"; }?>

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.