Apache works on http and https, SVN only on http
Posted
by
user27880
on Server Fault
See other posts from Server Fault
or by user27880
Published on 2013-11-01T16:25:15Z
Indexed on
2013/11/05
21:57 UTC
Read the original article
Hit count: 349
svn
I asked a question about this before, and got most of it fixed. If I switch off https redirect and go to http://mydomain.com/svn/test0, I get the authentication window popping up, and I can enter my AD credentials, and bingo. Switching https redirect back on, if I go to http://mydomain.com I am automatically redirected to https, which is what I want, and the 'CerntOS test page' pops up. Perfect.
The problem occurs when I want to go to one of my test repos via https. Here is my httpd.conf file, with confidential information suitably hosed...
===
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName svn.mycompany.com
ErrorLog logs/subversion-error_log
CustomLog logs/subversion-access_log common
Redirect permanent / https://svn.mycompany.com
</VirtualHost>
<VirtualHost svn.mycompany.com:443>
SSLEngine On
SSLCertificateFile /etc/httpd/ssl/wildcard.mycompany.com.crt
SSLCertificateKeyFile /etc/httpd/ssl/wildcard.mycompany.com.key
SSLCertificateChainFile /etc/httpd/ssl/intermediate.crt
ServerName svn.mycompany.com
ServerAdmin [email protected]
ErrorLog logs/subversion-error_log
CustomLog logs/subversion-access_log common
<Location /svn>
DAV svn
SVNParentPath /usr/local/subversion
SVNListParentPath off
AuthName "Subversion Repositories"
# NT Logon Details
Require valid-user
AuthBasicProvider file ldap
AuthType Basic
AuthzLDAPAuthoritative off
AuthUserFile /etc/httpd/conf/svnpasswd
AuthName "Subversion Server II"
AuthLDAPURL "ldap://our-pdc:389/OU=Company Name,DC=com,DC=co,DC=uk?sAMAccountName?sub?(objectClass=*)"
AuthLDAPBindDN "DOMAIN\subversion"
AuthLDAPBindPassword XXXXXXX
AuthzSVNAccessFile /etc/httpd/conf/svnaccessfile
</Location>
</VirtualHost>
===
Now, in ssl_error_log, I get
===
==> /etc/httpd/logs/ssl_error_log <==
[Fri Nov 01 16:07:55 2013] [error] [client XXX.XXX.XXX.XXX] File does not exist: /var/www/html/svn
===
This comes from the DocumentRoot directive further up the httpd.conf file, which of course points to /var/www/html. I know that this location is wrong, but how can I get SVN to serve the repo?
I tried an Alias directive as so ..
Alias /svn /usr/local/subversion
.. but this didn't work. I tried to alter the Location directive. That didn't work either.
Can someone help? I sense that this is so close to being solved ...
Thanks.
Edit: apachectl -S
output:
[root@svn conf]# apachectl -S
VirtualHost configuration:
127.0.0.1:443 svn.mycompany.com (/etc/httpd/conf/httpd.conf:1020)
wildcard NameVirtualHosts and default servers:
default:443 svn.mycompany.com (/etc/httpd/conf.d/ssl.conf:74)
*:80 is a NameVirtualHost
default server svn.mycompany.com (/etc/httpd/conf/httpd.conf:1012)
port 80 namevhost svn.mycompany.com (/etc/httpd/conf/httpd.conf:1012)
Syntax OK
© Server Fault or respective owner