The Apache Haus Forum

Forum Topics => Third-party Modules => Topic started by: AugustZellmer on January 29, 2020, 04:56:41 PM

Title: Server "cannot load" mod_dav_svn. Help?
Post by: AugustZellmer on January 29, 2020, 04:56:41 PM
I have an Apache webserver. Currently it's serving a live website, and everything works great. Now, I need it to serve a SVN repo as well. However, every time I call LoadModule dav_svn_module "C:/[directory]/modules/mod_dav_svn.so", I get the error Syntax error on line 12 of C:/[directory]/conf/httpd.conf: Cannot load C:/[directory]/modules/mod_dav_svn.so into server: The specified module could not be found. (Of course I'm not actually using "[directory]", I just wanted to scrub my folder structure for this post.)

Here's what I've done to try to get it working:
First, I installed the newest version of Microsoft Visual C++ Redistributable. Therefore, I now have all of the following installed:
Secondly, I updated Apache to the newest version obtained from Apache Haus. I'm using version "httpd-2.4.41-o111c-x64-vc15-r2.zip".
Third, I downloaded the module binaries from Nono303's GitHub repo. I wasn't completely sure how to install them, so I simply copied the following 6 files from nono303/win-svn/vc15/x64 into C:/[directory]/modules.
At this point, I confirmed that the server was still serving my website correctly, and everything was working as expected.
Finally, I added LoadModule dav_svn_module "C:/[directory]/modules/mod_dav_svn.so" to my configuration file, so it looks like this:
Define SRVROOT C:/[directory]/

ServerRoot "${SRVROOT}"

LoadModule access_compat_module modules/mod_access_compat.so
LoadModule alias_module modules/mod_alias.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule cache_module modules/mod_cache.so
LoadModule cache_disk_module modules/mod_cache_disk.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_svn_module "C:/[directory]/modules/mod_dav_svn.so"
LoadModule dir_module modules/mod_dir.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so

# PHP specific setup.
PHPIniDir "C:/[phpDirectory]"
LoadModule php7_module "C:/[phpDirectory]/php7apache2_4.dll"

[other configuration follows]


Now, every time I run httpd.exe, I get the error mentioned above.

What am I doing wrong? Did I miss a step? Are my versions incompatible?
Title: Re: Server "cannot load" mod_dav_svn. Help?
Post by: mario on January 30, 2020, 09:25:50 AM
Hi August,
mod_dav_fs is missing.


LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so

LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /svn/>
  DAV svn

  SVNListParentPath on
  SVNParentPath /Repositories/
  SVNIndexXSLT "/svnindex.xsl"
  SVNPathAuthz on
  AuthzSVNAccessFile "C:/Repositories/authz"

  AuthName "Subversion Repositories"
  AuthType Basic
  AuthUserFile "C:/Repositories/htpasswd"

  require valid-user
</Location>


mod_dontdothat
It is enabled via single httpd.conf directive, DontDoThatConfigFile:

<Location /svn>
DAV svn
SVNParentPath /path/to/repositories
DontDoThatConfigFile /path/to/config.file
DontDoThatDisallowReplay off
</Location>


The file you give to DontDoThatConfigFile is a Subversion configuration file that contains the following sections.


[recursive-actions]
/*/trunk = allow
/ = deny
/* = deny
/*/tags = deny
/*/branches = deny
/*/* = deny
/*/*/tags = deny
/*/*/branches = deny
Title: Re: Server "cannot load" mod_dav_svn. Help?
Post by: mario on January 30, 2020, 09:43:04 AM
I also uploaded the old readme file from Apachehaus https://gist.github.com/JBlond/edb6f37915f9c9731b9921a94b4ce6a6