You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "I. E. Smith-Heisters" <pu...@0x09.com> on 2006/06/25 20:34:09 UTC

Use Apache to force mime-type

Hi all,

I want to serve files directly from my SVN repo without checking out a
working copy into my DocumentRoot. I guess the usual way of doing this
is by using the svn:mime-type property, but I'd like to also retain
the default behavior of dav_svn. So, what I was thinking is I could
setup two Apache Virtual Servers, eg. svn.example.com and
dl-svn.example.com, where svn.example.com would have the default
dav_svn configuration, and dl-svn.example.com would have apache
configured to determine mime-type as it would with a normal webserver,
eg. parse and render .php, render .html, download .tar.gz, etc.

Does anyone have an idea of how to configure Apache to do something
like that? I would think there should be a simple mod_mime option I
could set, but I've been unable to figure anything out.

Thanks,
Ian Smith-Heisters

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Use Apache to force mime-type

Posted by "I. E. Smith-Heisters" <pu...@0x09.com>.
Yeah, that's what I've been doing elsewhere... it just seems a little
inelegant and consumes unnecessary disk space. But, then, it *does*
work... whereas the other idea is, well, just an idea ;) Thanks for
the advice.

-Ian

On 6/25/06, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Jun 25, 2006, at 22:34, I. E. Smith-Heisters wrote:
>
> > I want to serve files directly from my SVN repo without checking out a
> > working copy into my DocumentRoot. I guess the usual way of doing this
> > is by using the svn:mime-type property, but I'd like to also retain
> > the default behavior of dav_svn. So, what I was thinking is I could
> > setup two Apache Virtual Servers, eg. svn.example.com and
> > dl-svn.example.com, where svn.example.com would have the default
> > dav_svn configuration, and dl-svn.example.com would have apache
> > configured to determine mime-type as it would with a normal webserver,
> > eg. parse and render .php, render .html, download .tar.gz, etc.
> >
> > Does anyone have an idea of how to configure Apache to do something
> > like that? I would think there should be a simple mod_mime option I
> > could set, but I've been unable to figure anything out.
>
> I don't think you can do it that way.
>
> If you want to have two vhosts, one of which just shows the raw html
> and php files, and the other which interprets the php and shows the
> html as a web page, then I'd suggest you:
>
> - check out a central working copy of the repository (or relevant
> part of the repository) on the web server. This is what you'd point
> "dl-svn.example.com" at, and Apache would evaluate any PHP and apply
> the MIME types it knows about from its configuration files.
> - set up a post-commit hook which updates the central working copy
> after every commit.
> - do not use the svn:mime-type property. The normal "svn.example.com"
> vhost is then the one where you can see the raw files as they are in
> the repository.
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Use Apache to force mime-type

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 25, 2006, at 22:34, I. E. Smith-Heisters wrote:

> I want to serve files directly from my SVN repo without checking out a
> working copy into my DocumentRoot. I guess the usual way of doing this
> is by using the svn:mime-type property, but I'd like to also retain
> the default behavior of dav_svn. So, what I was thinking is I could
> setup two Apache Virtual Servers, eg. svn.example.com and
> dl-svn.example.com, where svn.example.com would have the default
> dav_svn configuration, and dl-svn.example.com would have apache
> configured to determine mime-type as it would with a normal webserver,
> eg. parse and render .php, render .html, download .tar.gz, etc.
>
> Does anyone have an idea of how to configure Apache to do something
> like that? I would think there should be a simple mod_mime option I
> could set, but I've been unable to figure anything out.

I don't think you can do it that way.

If you want to have two vhosts, one of which just shows the raw html  
and php files, and the other which interprets the php and shows the  
html as a web page, then I'd suggest you:

- check out a central working copy of the repository (or relevant  
part of the repository) on the web server. This is what you'd point  
"dl-svn.example.com" at, and Apache would evaluate any PHP and apply  
the MIME types it knows about from its configuration files.
- set up a post-commit hook which updates the central working copy  
after every commit.
- do not use the svn:mime-type property. The normal "svn.example.com"  
vhost is then the one where you can see the raw files as they are in  
the repository.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org