Shorter url

After a couple of years experimenting with fossil as my scm, I’m moving back to git… and scm-manager. I can’t remember for sure, but it seems like the urls used to be shorter, currently, I have a code repo hosted on scm-manager (and about 8 others), the url looks like:

http://odin:8080/scm/repo/scmadmin/code

I thought it used to be something along the lines of:

http://odin:8080/repos/code

or even

http://odin:8080/code

Is this possible or am I misremembering (used version 1 and 2 and maybe even early 3…)?

Thanks,

Will

Hello @decuser,

no this is not possible. You can remove the scm part of the path, by setting the context path. For more information take a look here. Alternatively you could use a reverse proxy to redirect the shorter urls to the actual ones.

With kind regards,

Thomas

Hi @thomas.zerr ,

Ah well, it was a nice thought. I’ll live with it. I know the url now and if I forget later, cat .git/config will bring it back to memory. Thanks!

  • will

Alternatively you could use a reverse proxy to redirect the shorter urls to the actual ones.

I’m trying to do this right now. My rules are:

location /  {										
			proxy_pass http://svn;	
			
  }  
		location /scmadmin/ {			
		    rewrite ^/scmadmin/(.*)$ /scm/repo/scmadmin/$1 break;
			proxy_pass http://svn;			
		}
  }

In nginx log is see that request to /scmadmin/My_REPO was rewriten to /scm/repo/scmadmin/My_REPO, but:

  1. Browser show me header, footer and no contentof repo’s main page. Log reports:
 host: "svn"
 upstream prematurely closed connection while reading response header from upstream,
  1. TortioseSVN shows error “invalid path” on attempts to checkout repo or commit changes. While actualy i still can commit but there is an error.
    Yep, i’ve used this manual to configure nginx
    So, the question is - do anybody have successfull example of shortening url IRL ?

Hi @dudki

thank you for your post! And welcome to our community.
Maybe this is helpful for you: Enhance URL Redirection for User-friendly Access to SVN Files · Issue #2193 · scm-manager/scm-manager · GitHub another user found a workaround. But there is no guarante that it will work on your side too.

Anyways currently we do have no plans to put this as a feature on our roadmap. Maybe in the future.
Why do you want to shorten your URLs?

Thank you, Christoph!
You were right, it doesn’t work :slight_smile:
My team asked me to short the URL if possible. Seems like not. The simptoms are all the same.