Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Rule help needed - SVN Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
AndyA
Newbie
Newbie


Joined: 04 July 2008
Online Status: Offline
Posts: 3
Posted: 04 July 2008 at 3:22am | IP Logged Quote AndyA

Hi,

Appologies if this has already been asked but i can't see any specifics already on the forum...

I'm running IIS as my (single server) main web server, with apache installed to give SVN functionality over the web using SSL.

I'm trying to do a reverse proxy so that i can access the svn server from the internet.

I can get a simple rewrite rule to work when i'm inside the network, but the moment i convert this to a proxy rule it gives me a 'cannot display web page error'

The rule that does work is...

RewriteEngine on
RewriteBase /
RewriteRule svn(.+) https://server:8443/svn$1 [NC]

But the moment i put the [NC,P] in it stops.  A working path would be something like https://server:8443/svn/Main  and i would like to access it from the internet with something like  https://www.mydomain.com/svn/Main

Both apache and IIS are on the same box, although there are different SSL certificates on the apache and IIS. Apache is listening on port 8443.

Any help very gratefully received

Thanks in advance

Andy

Back to Top View AndyA's Profile Search for other posts by AndyA
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 688
Posted: 04 July 2008 at 4:22am | IP Logged Quote Vyacheslav

Hi Andy!

Please try this solution:

RewriteEngine On
RewriteCond %{HTTP:Host} ^(?:www\.)?mydomain\.com$ [NC]
RewriteCond %{REQUEST_URI} ^/svn/(.+)$
RewriteRule .? https://server:8443/svn/%1 [R=301,L]

Edited by Vyacheslav - 04 July 2008 at 4:27am


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
AndyA
Newbie
Newbie


Joined: 04 July 2008
Online Status: Offline
Posts: 3
Posted: 05 July 2008 at 4:25am | IP Logged Quote AndyA

Hi,

Thanks for the response.  I'm getting closer.

I'm now being prompted for authentication against my subversion server which means the redirect is working.  However the authentication now doesn't seem to work.

I get prompted for my username and password (basic auth) but no matter what i enter, it doesn't accept it.

Please help!!!!!

Thanks

Andy

For now the rules (i took off the ssl for now) are:

RewriteCond %{REQUEST_URI} ^/svn/(.+)$

RewriteRule ^svn/?(.*)$ http\://server:8080/svn/$1 [U,P]

Back to Top View AndyA's Profile Search for other posts by AndyA
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 5225
Posted: 07 July 2008 at 4:03am | IP Logged Quote Anton

Please try to use these rules:

RewriteCond %{REQUEST_URI} ^/svn/(.+)$

RewriteProxy ^svn/?(.*)$ http://server:8080/svn/$1 [U,CR]



__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
AndyA
Newbie
Newbie


Joined: 04 July 2008
Online Status: Offline
Posts: 3
Posted: 08 July 2008 at 1:04pm | IP Logged Quote AndyA

Hi,

Tried the last solution and still not working.

If i convert the RewriteProxy to a RewriteRule it all works fine (assuming i'm on my local net so the redirect can work).

Its just when i turn this to be a proxy, i get the authentication box for subversion, but it simply won't accept my username and password (even though it does when i use it as a rule rather than a proxy).

This is driving me mad as i'm sure the answer is very simple.

Any more thoughts (i'm definitely buying if it works by the way!)

Thanks

Andy

Back to Top View AndyA's Profile Search for other posts by AndyA
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 5225
Posted: 09 July 2008 at 4:58am | IP Logged Quote Anton

Please try to use the following rule:

RewriteProxy ^svn/?(.*)$ https://server:8443/svn/$1 [U,CR]

If it doesn't work, please give more explicit description of your authentication scheme.



__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You can vote in polls in this forum