URL redirect after host rename

I installed Kunagi on Ubuntu 10.04 with tomcat6. I installed tomcat6 via apt-get and Kunagi by deploying the war file in the tomcat6 manager app.
It seems to work great from the local machine. However, when I moved the machine to it's true home and tried to connect to it remotely from a different machine (on the same network), my browser keeps wanting to default to "localhost" in the url.
i.e. I type http://192.168.0.110:8080/kunagi the browser ends up rewriting the url to "http://localhost:8088/kunagi/login.html". Even if I change the localhost to the ip address and get further (I see the login screen), it's just the next click that reverts to localhost in the url.
Is this a tomcat issue or a Kunagi one? I have no other apps installed in this tomcat instance except the tomcat examples, but they all work, as well as the admin & manager app.

Statement from Kunagi Team

Kunagi uses a configurable redirect to allow working behind Apache. Kunagi remembers its first URL, which you can change manually.

Login as admin, go to System Configuration and put the right URL with the right port to Public URL.

Alternatively edit config.properties and set the parameter url=http://my-custom-url/.

See also iss255 and iss491.

Status

Issue is closed.

Comments

Mon, Oct 15, 2012, 04:34 by Scott

I'm unable to logon as admin (hence the original issue and cannot edit the file since it is packaged in a .war file. Stuck.

Mon, Oct 15, 2012, 10:29 by Witek (SM,T)

Sorry, I don't understand your problem. Which file do you mean (by "packaged in a .war file")?

You can edit config.properties which is in the kunagi-data directory.

Mon, Feb 3, 2014, 17:18 by Stefan Höhn

I got the same problem. The reason is that the URL is also administrated in the system settings section which you can reach as an admin. However if you have already moved your system to a new server, you are somehow stuck as you cannot access the system. Therefore you have to edit kunagi's "database":

You can use the following workaround if you are follow the following steps very carefully:

1) Shutdown tomcat
2) goto the kunagi-data directory
3) find the config.properties and edit the line as follows
url=htts\://mykunagidomain/kunagi/
4) Now go down to ./entities/systemConfig/
5) There should be only one file (entity). Open that xml-file and find the tag <url>
6) Edit the line as follows:
<url>https://mykunagidomain/kunagi/</url>
7) Save the xml
8) Restart tomcat

Post a comment



optional
optional