I'm trying to access an existing Subversion server over HTTP. My dav_svn.conf file looks like:
<Location /svn>
DAV svn
SVNParentPath /home/svn/repos
SVNListParentPath on
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/svn/passwdfile
Require valid-user
AuthzSVNAccessFile /home/svn/accessfile
</Location>
But when I'm trying to access "some-site/svn", I'm getting the following error:
The requested URL /svn/ was not found on this server.
The Apache error log shows "file does not exist: /var/www/svn"
How do I resolve this?
Run this:
a2enmod dav_svn
service apache2 restart
as super user (root), e.g. sudo a2enmod dav_svn && sudo service apache2 restart.
This assumes that you are using the proper method (Debian+Ubuntu) of editing the two files: /etc/apache2/mods-available/dav_svn.{conf,load}, not some homebrew method.
Related
I have created SVN host using:
<Location /svn>
DAV svn
SVNParentPath /home/xxx/xxx/xxx/xxx/Main_Folder/company-1
AuthType Basic
SVNListParentPath On
AuthName "Test"
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>`
Although I have specified user privileges in svnserve.conf, it does not seem to "take it" because I can access the repository (see below) without any prompt for user/password.
Can you please point what am I doing wrong?
Thanks!
Read the docs, it seems that you use a wrong configuration file.
Configuration settings in the file svnserve.conf do not have any effect in this particular case. Your server runs Apache and Apache does not process svnserve.conf. This configuration file is used by svnserve custom server only.
Installed Redmine, configured automatic repository svn creation for this projects.
But when i restart httpd service, this erro happend.
[root#iZ23lttzrggZ config]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 42 of /etc/httpd/conf.d/subversion.conf:
Invalid command 'PerlLoadModule', perhaps misspelled or defined by a module not included in the server configuration
This my PerlLoadModule file:
PerlLoadModule Apache::Redmine
<Location /svn>
DAV svn
SVNParentPath "/opt/repositories/svn"
SVNListParentPath on
Order deny,allow
Deny from all
Satisfy any
LimitXMLRequestBody 0
SVNPathAuthz off
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
AuthType Basic
AuthName "Subversion Repository"
Require valid-user
RedmineDSN "DBI:mysql:database=redmine_db;host=localhost:3306"
RedmineDbUser "redmine_admin"
RedmineDbPass "**********"
</Location>
DELETE this:
PerlLoadModule Apache::Redmine
<Location /svn>
DAV svn
SVNParentPath "/opt/repositories/svn"
SVNListParentPath on
Order deny,allow
Deny from all
Satisfy any
LimitXMLRequestBody 0
SVNPathAuthz off
PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
AuthType Basic
AuthName "Subversion Repository"
Require valid-user
RedmineDSN "DBI:mysql:database=redmine_db;host=localhost:3306"
RedmineDbUser "redmine_admin"
RedmineDbPass "**********"
</Location>
And then restart the httpd service
[root#iZ23lttzrggZ lmmbao]# service httpd restart
yum install -y epel-release
yum install -y mod_perl
I set up SVN on Ubuntu using the tutorial How to set up a Subversion (SVN) server on GNU/Linux - Ubuntu, but when I try access the repository from other machine using CMD it says Access to /SVN is forbidden.
I changed the permission of the folder and tried other methods to resolve the issue like configuration of the Apache server, but that did not solve my problem.
How can I fix this problem?
Apache can read and write the repository, but its user (www-data) needs to be given ownership of it:
sudo chown -R www-data:www-data /var/svn/repositories/your_repo
To be able to authenticate users who access the repository a password file is needed:
sudo htpasswd -c /etc/subversion/passwd your_user_name
Enter a password for the user your_user_name. For additional users repeat the command without the -c option to make sure the existing file is appended to rather than replaced.
Then edit the Apache configuration file:
sudo gedit /etc/apache2/apache2.conf
Add the following to the end of the file:
#svn users
<Location /svn>
DAV svn
SVNParentPath /var/svn/repositories/
SVNListParentPath On
AuthType Basic
AuthName "Test"
AuthUserFile /etc/subversion/passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
Save the configuration file and restart Apache:
sudo /etc/init.d/apache2 restart
The test repository can now be accessed via:
http://localhost/svn/your_repo
Make sure you have your virtual host set up like this for Apache:
<VirtualHost *:80>
DocumentRoot /home/svn/html
ServerName svn.domainname
ErrorLog logs/svn.domain.com-error_log
CustomLog logs/svn.domain.com-access_log common
<Directory "/home/svn/html">
Order allow,deny
Allow from all
AllowOverride all
</Directory>
<Location /repos>
DAV svn
SVNParentPath /home/svn/repos
Require valid-user
SVNListParentPath on
AuthType Basic
AuthName "Your Super SVN"
AuthUserFile /home/svn/svn-passwords-file-to-be-used-only-when-AuthType-is-used
AuthzSVNAccessFile /home/svn/svn-repos-acl-file-but-optional
</Location>
</VirtualHost>
And make sure Apache can access the repos folder mentioned in SVNParentPath. This issue is mostly because of permissions. Try chmod -R 0777 repos-folder and try again.
This might help someone if they are troubleshooting a setup that had previously been working. Today the new guy at our company inadvertently introduced a typo in the file used by AuthzSVNAccessFile and that caused all of us to experience the dreaded E175013
I have installed svn, version 1.6.17 (r1128011) on to Ubuntu 12-04
I made my repo here:
$ sudo mkdir /home/2nd-disk/svn
Set up my /etc/apache2/mods-enabled/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /home/2nd-disk/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
Created an account:
sudo htpasswd -cm /etc/apache2/dav_svn.passwd myusername
Created a test repo
$ cd /home/2nd-disk/svn
$ sudo svnadmin create test_repo
Ran a chown:
$ sudo chown -R www-data:www-data /home/2nd-disk/svn
Insured a2enmod & dav_svn are loaded and restarted apache2:
$ sudo a2enmod dav_svn && sudo service apache2 restart
Considering dependency dav for dav_svn:
Module dav already enabled
Module dav_svn already enabled
* Restarting web server apache2
... waiting
I then try to browse to http://mydomain.com/svn/test_repo and I get a 404 not found.
The same happens with http://mydomain.com/svn/test_repo
Going to http://mydomain.com shows the default 'It Works!' apache page.
Do I need to change virtual hosts here? I followed this tutorial below to the T and so assumed not:
http://rbgeek.wordpress.com/2012/05/01/svn-server-on-ubuntu-12-04-lts-with-web-access/
I have this problem sovled just now .
prep. I set up my /etc/apache2/http.conf
LoadModule dav_module /usr/lib/apache2/mod_dav.so
LoadModule dav_svn_module /usr/lib/apache2/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/apache2/mod_authz_svn.so
It works for a period without 404 while I then try to browse to http://mydomain.com/svn/test_repo .But after I reboot my Linux, I get a 404 not found.
Try to add the lines to /etc/apache2/conf.d.subversion.conf
LoadModule dav_module /usr/lib/apache2/mod_dav.so
LoadModule dav_svn_module /usr/lib/apache2/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/apache2/mod_authz_svn.so
My SVN works well now! I wish these recommendations can help you.
add the reference to your vhost instead of dav_svn.conf:
<Location /svn>
DAV svn
SVNPath /var/local/svn
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /etc/apache2/dav_svn.passwd
<LimitExcept GET PROPFIND OPTIONS REPORT>
Require valid-user
</LimitExcept>
</Location>
good tutorial is here: http://wiki.ubuntuusers.de/Subversion
don't forget to restart apache to apply changes:
sudo /etc/init.d/apache2 restart
I am running a website on my server with Apache, and I have also setup SVN with Apache.
The problem arises when I make changes in httpd.conf to setup SVN and restart Apache. It starts to serve files as SVN, but it stops my website. Then every user can see my source code.
I want to make my server as development server and production server. How can I run Apache for SVN and host my website?
First install dav svn:
apt-get install libapache2-svn
root#example:/var# mkdir svn
root#example:/var# cd svn
root#example:/var/svn# svnadmin create repo
a2enmod dav_svn
Change permissions for Apache:
chown -R root.www-data /var/svn
chmod -R g+rw /var/svn
Add the repository to a virtual host
<Location /svn/myrepo>
DAV svn
SVNPath /var/svn/repo
AuthType Basic
AuthName "My Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
htpasswd2 /etc/apache2/dav_svn.passw user