How to enable svn over apache and ldap authentication?

Questions about HTTP Access/Mods may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/support_form.php?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
Hilfesuchender
I'm New!
I'm New!
Posts: 2
Joined: Sun Nov 10, 2013 6:51 pm

How to enable svn over apache and ldap authentication?

Postby Hilfesuchender » Sun Nov 10, 2013 7:11 pm

Hi folks,

I try to enable subversion over apache and ldap authentication. It's a DS 213+, DSM 4.3

First try:
-use built-in web server
-enable ldap authentication (see viewtopic.php?f=34&t=42058) --> works
-download apache/svn ipkg for missing apache-svn libraries (mod_authz_svn.so, mod_dav_svn.so)
-used apache config from http://forum.synology.com/wiki/index.ph ... Subversion
-apache starts without error message, but if I open the svnrep-url in the browser, just a 403 error is displayed. It seems that the svn-apache configuration is not used and the webserver tries to lookup the file in the standard-www dir (where it does not exist):

[Sun Nov 10 18:40:14 2013] [notice] Apache/2.2.25 (Unix) DAV/2 SVN/1.7.7 configured -- resuming normal operations
[Sun Nov 10 18:40:14 2013] [info] Server built: Sep 16 2013 00:29:04
[Sun Nov 10 18:40:14 2013] [debug] prefork.c(1023): AcceptMutex: sysvsem (default: sysvsem)
[Sun Nov 10 18:40:57 2013] [error] [client 192.168.178.26] user is null: /svn/xim/
[Sun Nov 10 18:40:57 2013] [error] [client 192.168.178.26] File does not exist: /var/services/web/svn
[Sun Nov 10 18:40:57 2013] [debug] mod_deflate.c(615): [client 192.168.178.26] Zlib: Compressed 206 to 163 : URL /svn/xim/


Second try:
-install additional apache (http://forum.synology.com/wiki/index.ph ... Subversion) --> works
-tried to use "mod_authnz_ldap.so" from built-in webserver
-apache2 does not start - "/opt/libexec/mod_authnz_ldap.so: undefined symbol: ap_get_exec_line"

So, I've got 2 optione:
-Can anybody help me to enable the svn-module in the built-in webserver?
-Can anybody help me to enable ldap support in the "additional" apache?

Any help is appreciated.

Regards,
Andreas
conezxy
I'm New!
I'm New!
Posts: 1
Joined: Tue Dec 24, 2013 7:27 am

Re: How to enable svn over apache and ldap authentication?

Postby conezxy » Tue Dec 24, 2013 7:39 am

I have same problem, today i solved it.

-use built-in web server
-use additional dav and svn module

LoadModule dav_module /opt/libexec/mod_dav.so
LoadModule dav_svn_module /opt/libexec/mod_dav_svn.so

according to viewtopic.php?f=145&t=72838&p=276690&hilit=mod_dav_svn#p276690
guinness_is_good
I'm New!
I'm New!
Posts: 1
Joined: Thu Jan 09, 2014 7:53 pm

Re: How to enable svn over apache and ldap authentication?

Postby guinness_is_good » Thu Jan 09, 2014 7:58 pm

I have a DSM214+

I want to use the built in apache and synology subversion packages

1) Where to find the following modules to enable https:// for svn. The link above wasn't helpful
LoadModule dav_module /opt/libexec/mod_dav.so
LoadModule dav_svn_module /opt/libexec/mod_dav_svn.so

2) where do I put these files. I don't have an /opt/ directory

Bottom line:
I want to use built in Apache + Svn and enable Https access
User avatar
warnergt
Beginner
Beginner
Posts: 28
Joined: Sun Apr 06, 2014 3:09 am

Re: How to enable svn over apache and ldap authentication?

Postby warnergt » Thu Nov 13, 2014 11:31 pm

I, too, am trying to using the built-in web services (apache?) and built-in subversion packages to provide http access to the subversion files but am having a lot of difficulty. I've done this before on a ubuntu Linux system with no problems. On a Synology box, this gets wacky since it has built-in web services and svn but you have to also install apache and svn packages to get the extra necessary files. And how to do this is not well documented anywhere.

Here is what I have done:
1) Got the bootstrap and installed ipkg as described here:
http://forum.synology.com/wiki/index.ph ... ,_ipkg_etc
2) Used ipkg to install apache and svn packages to get mod_dav.so and mod_dav_svn.so.
3) Verified that built-in svn and web services work.
4) Verified that the installed apache2 works (even though I don't want to use this).
5) Modified /etc/httpd/conf/httpd.conf-user to load modules:
LoadModule dav_module /opt/libexec/mod_dav.so
LoadModule dav_svn_module /opt/libexec/mod_dav_svn.so
6) Modified /etc/httpd/conf/httpd.conf-user to handle svn URLs.
# Repository is /volume1/MGW_repos/ARM_sw:
<Location /MGW_repos>
DAV svn
SVNParentPath /volume1/MGW_repos
</Location>


I think I'm getting close but, when I go to access my repository from a web browser, I get the following error message:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<D:error><C:error/><m:human-readable errcode="13">
Could not open the requested SVN filesystem
</m:human-readable></D:error>

I'm attempting to do this on a DS415+ DSM 5.1-5004 (iAtom processor).
Any help is greatly appreciated.
DS414 DSM 5.1-5004
DS415+ DSM 5.1-5004
User avatar
warnergt
Beginner
Beginner
Posts: 28
Joined: Sun Apr 06, 2014 3:09 am

Re: How to enable svn over apache and ldap authentication?

Postby warnergt » Fri Nov 14, 2014 5:27 pm

I did finally get Subversion working with HTTP but not with the built-in Subversion and built-in web services. I had to deinstall the built-in Subversion (through the Package Center) use ipkg to install the downloadable packages for svn and apache to make it work.

For reference, the steps required are:
1) Download the bootstrap script to install ipkg as described here:
http://forum.synology.com/wiki/index.ph ... ,_ipkg_etc

2) Install apache and svn as described here:
http://forum.synology.com/wiki/index.ph ... Subversion

Some additional notes for (possibly outdated) installation procedures that I needed for my DS415+ DSM 5.1-5004 iAtom server:
2a) Edit /opt/sbin/apachectl
Change
HTTPD='/opt/sbin/httpd'
to
HTTPD='/opt/sbin/apache-httpd'

2b) Edit /opt/etc/apache2/httpd.conf
Comment out line 74 for missing library.
# LoadModule ext_filter_module /opt/libexec/mod_ext_filter.so
DS414 DSM 5.1-5004
DS415+ DSM 5.1-5004
User avatar
warnergt
Beginner
Beginner
Posts: 28
Joined: Sun Apr 06, 2014 3:09 am

Re: How to enable svn over apache and ldap authentication?

Postby warnergt » Thu May 28, 2015 6:53 pm

Update: Since the DSM 5.2 update, my installed apache HTTP server stopped working.
The fix is to edit /opt/etc/apache2/httpd.conf and
change: Group # -1
to: Group http

Now, the apache HTTP server is working with svn again.
DS414 DSM 5.1-5004
DS415+ DSM 5.1-5004
User avatar
warnergt
Beginner
Beginner
Posts: 28
Joined: Sun Apr 06, 2014 3:09 am

Re: How to enable svn over apache and ldap authentication?

Postby warnergt » Mon Mar 28, 2016 7:06 pm

Update: The DSM 6.0 update broke my svn server. Interestingly, the HTTP file access still worked.
To get it working again, I did a few steps:
1. I installed the Synology svn package.
So now, I think I actually have two svn packages installed: the one I installed manually (at /opt/bin) and the Synology version (at /bin).
2. The Synology svn wants the svn repositories at /volume_name/svn.
However, my HTTP apache2 server wants them at /opt/share/repos_dir.
No matter what I did (softlinks, etc.), I could not get the apache2 server to access the files at /volume_name/svn.
However, if I put softlinks at /volume_name/svn to /opt/share/repos_dir, I could get it all to work.
So, that is what I did.

So, I have softlinks that look something like this:
/volume_name/svn/repo_name -> /opt/share/repos_dir/repo_name

The actual svn files reside in the /opt/share/repos_dir/repo_name directory.

The Synology svn GUI still works with this as it appears to be compatible.

It would be interesting to see if the HTTP access could be made to work without the manually installed svn but, now that I have it working, I'm leaving it alone.
DS414 DSM 5.1-5004
DS415+ DSM 5.1-5004
Arkady
I'm New!
I'm New!
Posts: 1
Joined: Mon Oct 31, 2016 11:23 pm

Re: How to enable svn over apache and ldap authentication?

Postby Arkady » Thu Dec 01, 2016 1:54 am

Hello, guys!
I'm new to this forum so pardon me if anything.
I'm wondering has anything changed since 2014? How do I enable built-in svn package to work via HTTP to make it accessible over internet?

Return to “HTTP/Apache Mods”

Who is online

Users browsing this forum: No registered users and 1 guest