You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris Croome <ch...@webarchitects.co.uk> on 2004/03/12 21:17:47 UTC
Support for HTTP Redirects? was: Re: https connection without http
Hi
On Fri 12-Mar-2004 at 09:21:08PM +0100, Marcin Gil wrote:
> Chris Croome wrote:
> >
> > I aslo create a Redirect from the http URI to the https one.
> >
> Will this work as 'svn co http://url/repo'?
Well it works to the extent that stuff can't be checked out
non-encrypted, you get this:
$ svn co http://svn.example.com/foo.jpg
svn: RA layer request failed
svn: PROPFIND request failed on '/foo.jpg'
svn: PROPFIND of '/foo.jpg': 302 Found (http://svn.example.com)
The same thing happens if there is a 301 rather than a 302.
I don't know if this is intentional or if svn has yet to have
support for 301 and 302 response codes added?
Chris
--
Chris Croome <ch...@webarchitects.co.uk>
web design http://www.webarchitects.co.uk/
web content management http://mkdoc.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Support for HTTP Redirects? was: Re: https connection without
http
Posted by Marcin Gil <mg...@vernet.pl>.
Sander Striker wrote:
>
>>I don't know -- can I put a <Location> inside <VirtualHost>, so that
>>this locations is obeyed only at specified virtual host?
>
>
> Sure.
And that solved my problem. I ain't apache guru -- didn't try that on my
production server until 100% sure. Now it works perfectly. No
redirections, no http access - pure https.
Thanks to all for support. Regards!
--
Marcin Gil
email# mgil : vernet pl | GaduGadu ID# 185057
JID# dentharg : chrome pl | http://marcin.gilusiowy.net
Re: Support for HTTP Redirects? was: Re: https connection without
http
Posted by Sander Striker <st...@apache.org>.
On Sat, 2004-03-13 at 15:53, Marcin Gil wrote:
> Chris Croome wrote:
> >
> > You will need to create a VirtualHost for each domain name, eg:
> >
> > <VirtualHost *:80>
> > ServerName one.example.com
> > Redirect /repo https://one.example.com/repo
> > </VirtualHost *:80>
> >
> > <VirtualHost *:80>
> > ServerName two.example.com
> > Redirect /repo https://two.example.com/repo
> > </VirtualHost *:80>
> >
> This is not a solution, since I have 100+ virtual hosts deployed on my
> server.
You could try some mod_rewrite voodoo (completely untested):
RewriteRule ^/repo(/.*)? https://%{SERVER_NAME}/repo$1 [R=permanent]
Or something to that effect.
> I don't know -- can I put a <Location> inside <VirtualHost>, so that
> this locations is obeyed only at specified virtual host?
Sure.
Sander
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Support for HTTP Redirects? was: Re: https connection without
http
Posted by Marcin Gil <mg...@vernet.pl>.
Chris Croome wrote:
>
> You will need to create a VirtualHost for each domain name, eg:
>
> <VirtualHost *:80>
> ServerName one.example.com
> Redirect /repo https://one.example.com/repo
> </VirtualHost *:80>
>
> <VirtualHost *:80>
> ServerName two.example.com
> Redirect /repo https://two.example.com/repo
> </VirtualHost *:80>
>
This is not a solution, since I have 100+ virtual hosts deployed on my
server.
I don't know -- can I put a <Location> inside <VirtualHost>, so that
this locations is obeyed only at specified virtual host?
--
Marcin Gil
email# mgil : vernet pl | GaduGadu ID# 185057
JID# dentharg : chrome pl | http://marcin.gilusiowy.net
Re: Support for HTTP Redirects? was: Re: https connection without http
Posted by Chris Croome <ch...@webarchitects.co.uk>.
Hi
On Sat 13-Mar-2004 at 01:10:24AM +0100, Marcin Gil wrote:
>
> If I have virtual defined as svn.example.com and the location is repo:
> - I access repo https://svn.example.com/repo
> - I've got several virtual hosts eg sum.funky.shit.com
> If I do redirects for VirtualHost svn.example.com will this work for
> sum.funky.shit.com too? Or do I have to put it in every single
> VirtualHost directive?
You will need to create a VirtualHost for each domain name, eg:
<VirtualHost *:80>
ServerName one.example.com
Redirect /repo https://one.example.com/repo
</VirtualHost *:80>
<VirtualHost *:80>
ServerName two.example.com
Redirect /repo https://two.example.com/repo
</VirtualHost *:80>
Chris
--
Chris Croome <ch...@webarchitects.co.uk>
web design http://www.webarchitects.co.uk/
web content management http://mkdoc.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Support for HTTP Redirects? was: Re: https connection without
http
Posted by Marcin Gil <mg...@vernet.pl>.
Chris Croome wrote:
>
> Redirect /foo https://svn.example.com/foo
>
> You can make them 301's like this:
>
> Redirect permanent /foo https://svn.example.com/foo
>
Thanks!!
Next quick question:
If I have virtual defined as svn.example.com and the location is repo:
- I access repo https://svn.example.com/repo
- I've got several virtual hosts eg sum.funky.shit.com
If I do redirects for VirtualHost svn.example.com will this work for
sum.funky.shit.com too? Or do I have to put it in every single
VirtualHost directive?
--
Marcin Gil
email# mgil : vernet pl | GaduGadu ID# 185057
JID# dentharg : chrome pl | http://marcin.gilusiowy.net
Re: Support for HTTP Redirects? was: Re: https connection without http
Posted by Chris Croome <ch...@webarchitects.co.uk>.
Hi
On Sat 13-Mar-2004 at 12:35:06AM +0100, Marcin Gil wrote:
>
> So, how do you create those redirections? By a index.html file
> with meta refresh, index.php with header(location) or with
> mod_rewrite?
None of those, just a simple Redirect statments in a VirtualHost,
like:
Redirect /foo https://svn.example.com/foo
You can make them 301's like this:
Redirect permanent /foo https://svn.example.com/foo
The key think to remember is that the destination has to be a fully
qualified URI.
More info here:
http://httpd.apache.org/docs-2.0/mod/mod_alias.html#redirect
Also RedirectMatch is nice, it's new in Apache 2:
http://httpd.apache.org/docs-2.0/mod/mod_alias.html#redirectmatch
It's simpler to get your head around that mod_rewrite and is quite
powerful.
Chris
--
Chris Croome <ch...@webarchitects.co.uk>
web design http://www.webarchitects.co.uk/
web content management http://mkdoc.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Support for HTTP Redirects? was: Re: https connection without
http
Posted by Marcin Gil <mg...@vernet.pl>.
Chris Croome wrote:
>>
>>>I aslo create a Redirect from the http URI to the https one.
>>>
>>
>>Will this work as 'svn co http://url/repo'?
>
>
> Well it works to the extent that stuff can't be checked out
> non-encrypted, you get this:
>
> $ svn co http://svn.example.com/foo.jpg
> svn: RA layer request failed
> svn: PROPFIND request failed on '/foo.jpg'
> svn: PROPFIND of '/foo.jpg': 302 Found (http://svn.example.com)
>
> The same thing happens if there is a 301 rather than a 302.
>
> I don't know if this is intentional or if svn has yet to have
> support for 301 and 302 response codes added?
>
So, how do you create those redirections? By a index.html file with meta
refresh, index.php with header(location) or with mod_rewrite?
--
Marcin Gil
email# mgil : vernet pl | GaduGadu ID# 185057
JID# dentharg : chrome pl | http://marcin.gilusiowy.net