1. Sebastian Sebastian
  2. scm-manager
  3. Issues

Issues

Issue #246 resolved

Application Request Routing

QualStone
created an issue

Using IIS, ARR, and URL Rewrite 2, I can change my url from http://localhost/8000/scm to http://scm

When I try and login though, it immediately tells me my login expired and makes me login again over and over.

Any thoughts?

Comments (3)

  1. Stephan Christann

    Hello Mike,

    perhaps there is a problem with trailing slashes and the url rewriting. As Sebastian told in https://groups.google.com/forum/?fromgroups=#!topic/scmmanager/q4TROlqO7Pg it might be not a good idea to change the url by rewriting. He gave an example configuration for this in the mentioned google group.

    ---8<--SNIP--

    Hi, Yes there is a way. It is not a good idea to change the context url in the reverse proxy. A better way is to change the context path in the conf/scm-server.xml:

    - Search the following lines:

    <New id="scm-webapp" class="org.eclipse.jetty.webapp.WebAppContext"> 
      <Set name="contextPath">/scm</Set> 
      <Set name="war"><SystemProperty name="basedir" 
    default="."/>/var/webapp/scm-webapp.war</Set> 
    </New> 
    

    - And replace them with:

    <New id="scm-webapp" class="org.eclipse.jetty.webapp.WebAppContext"> 
      <Set name="contextPath">/</Set> 
      <Set name="war"><SystemProperty name="basedir"  default="."/>/var/webapp/scm-webapp.war</Set> 
    </New> 
    

    - Search the following lines:

    <Set name="handler"> 
      <New class="org.eclipse.jetty.server.handler.HandlerCollection"> 
        <Set name="handlers"> 
          <Array type="org.eclipse.jetty.server.Handler"> 
            <Item> 
              <Ref id="scm-webapp" /> 
            </Item> 
            <Item> 
              <Ref id="docroot" /> 
            </Item> 
          </Array> 
        </Set> 
      </New> 
    </Set> 
    

    - and replace them with:

    <Set name="handler"> 
      <New class="org.eclipse.jetty.server.handler.HandlerCollection"> 
        <Set name="handlers"> 
          <Array type="org.eclipse.jetty.server.Handler"> 
            <Item> 
              <Ref id="scm-webapp" /> 
            </Item> 
          </Array> 
        </Set> 
      </New> 
    </Set>
    

    After that you could change your reverse proxy configuration to the following;

    ProxyPass / http://localhost:8080/ 
    ProxyPassReverse / http://localhost:8080/ 
    ProxyPassReverseCookiePath / http://localhost:8080/ 
    

    --->8--SNIP--

    Maybe you could give it a try?

  2. Log in to comment