0

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
2
  • Looks like you've got a different SSL vhost that's getting the requests. Provide the output from apachectl -S? Nov 1, 2013 at 17:02
  • [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
    – user27880
    Nov 5, 2013 at 9:51

2 Answers 2

0

I suppose Alias should work, but you also have to setup <Directory "/usr/local/subversion"> properly.

1
  • Thanks .. where do I put the Directory? I've tried it inside the SSL VirtualHost, inside Location ... no joy.
    – user27880
    Nov 5, 2013 at 9:56
0

Change <VirtualHost svn.mycompany.com:443> to <VirtualHost *:443>.

You have svn.mycompany.com resolving to 127.0.0.1 which is causing that bind to do nothing, and causing the _default_:443 bind in ssl.conf to get the requests (service up the default test page).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .