4

I'd like to change the default redirect for our new WSO2 server, so that if you go to the generic login.domain.com, it'll redirect you to a specific URL instead of the current default of login.domain.com/carbon/admin/login.jsp

This is what's coming through in the http_access.log file

172.16.1.22 - - [10/Mar/2017:11:31:52 -0600] "GET / HTTP/1.1" 302 - "-" "Mozilla/5.0 (X11; Linux i686; rv:54.0) Gecko/20100101 Firefox/54.0"

172.16.1.22 - - [10/Mar/2017:11:31:52 -0600] "GET /carbon HTTP/1.1" 302 - "-" "Mozilla/5.0 (X11; Linux i686; rv:54.0) Gecko/20100101 Firefox/54.0"

172.16.1.22 - - [10/Mar/2017:11:31:52 -0600] "GET /carbon/admin/index.jsp HTTP/1.1" 302 - "-" "Mozilla/5.0 (X11; Linux i686; rv:54.0) Gecko/20100101 Firefox/54.0"

172.16.1.22 - - [10/Mar/2017:11:31:52 -0600] "GET /carbon/admin/login.jsp HTTP/1.1" 200 15300 "-" "Mozilla/5.0 (X11; Linux i686; rv:54.0) Gecko/20100101 Firefox/54.0"

I've been googling around for this, but so far haven't been able to figure out what needs changed.

Has anyone tried to do something like this, or have any pointers on where I could look?

Thanks much!

Community
  • 1
  • 1
smily03
  • 57
  • 5
  • Christopher, can the answer be done using Apache? It is easy to do with Apache. – Tim May 22 '17 at 05:52
  • That's what I ended up doing, but I was hoping to eliminate the complexity of another moving piece. – smily03 Jun 01 '17 at 14:16

1 Answers1

1

On wso2 IS 5.1, in the file repository/conf/carbon.xml:

<!--
The URL of the index page. This is where the user will be redirected after signing in to the carbon server.
-->
<!-- IndexPageURL>/carbon/admin/index.jsp</IndexPageURL-->

When I uncommented and changed that line then restarted the service, the IS root redirected to the URL I specified. Note: this also affected the carbon logout redirect page too.

I checked IS 5.3 and the setting is still there. AM 2.1 also had this setting.

MrDevon
  • 276
  • 1
  • 4
  • (Sorry, I'm learning that I have to do shift+enter...) That's technically correct, but not what I was really asking; I guess I wasn't very clear in my initial question -- What I'm trying to do is if you go to just https://wso2server.domain.com, I want to be able to control where that redirects -- currently it redirects to the admin logon page. I'm wanting to be able to have it redirect to a specific SP login page. So, for example, if I go to https://wso2server.domain.com, I want that to redirect to https://myawesomesp.domain.com. – smily03 Jun 01 '17 at 14:11
  • @christopher-myers If I am understanding correctly, you want https://wso2server.domain.com to redirect to https://myawesomesp.domain.com, then setting `https://myawesomesp.domain.com` should do the trick. Regarding having it redirect to a specific SP login page, if your myawesomesp application automatically starts the authentication process, then it will already redirect to a specific SP login page. If you are wanting to mimic getting to the myawesomesp login page using IndexPageURL, that may be difficult depending on the auth protocol being used. – MrDevon Jun 02 '17 at 15:33
  • Cool, thank you. Our next outage window is June 22nd, so I'll test out that change then :) – smily03 Jun 09 '17 at 20:23