[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: same repository using http & https

From: Toby Johnson <toby_at_etjohnson.us>
Date: 2004-06-09 23:15:05 CEST

Robin Becker wrote:

> What Apache config do I use for
>
> http://host/svn/public world readonly
> https://host/svn/public developer writable
>
> http://host/svn/private invisible
> https://host/svn/private developer readable/writable
>
> I'm using the following and it fails to allow a valid login.
>
> in httpd.conf
> <Location /svn/public>
> DAV svn
> SVNPath /svn/public
> <LimitExcept GET PROPFIND OPTIONS REPORT>
> Order deny,allow
> deny from all
> </LimitExcept>
> </Location>
>
>
> in the ssl.conf
> <Location /svn>
> DAV svn
> SVNParentPath /svn
> AuthzSVNAccessFile /HTTPD/etc/svn_access
> Satisfy Any
> AuthType Basic
> AuthName "Subversion Repository"
> AuthUserFile /HTTPD/etc/passwd
> Require valid-user
> </Location>

Probably your biggest problem here is the fact that ssl.conf isn't
really a separate configuration file that Apache uses for only https.
Rather, it gets wholly included into httpd.conf at startup. Look for a
line like "Include conf.d/*.conf" in httpd.conf; in effect, that line
gets replaced with the contents of all .conf files in the conf.d
directory. Some Linux distros do this to make managing httpd-specific
packages easier (they can just create the .conf files they need instead
of editing the monolithic httpd.conf), but I always find it annoying and
just make one httpd.conf with all my settings, and remove the "Include"
line.

So, your general "Location /svn" block is getting wiped out by the more
specific "Location /svn/public" block for ALL requests, whether http or
https. I believe the way to achieve what you want is to create two
separate <VirtualHost> blocks. They can both use the same IP, but
different ports (80 and 443 for http and https, respectively).

 <VirtualHost 10.1.2.3:80>
    DocumentRoot /www/docs/host.foo.com
    ServerName host.foo.com
       ....

 <VirtualHost 10.1.2.3:443>
    DocumentRoot /www/docs/host.foo.com
    ServerName host.foo.com
    SSLEngine on
       ....

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 9 23:17:51 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.