Architecture / Installation

Architecture / Installation

How to change server hostname in 15.0?

posts: 3 United States


Just upgraded from 9 to 15 and the upgrade went smoothly. But...

Our tiki server is behind an exterior server that proxies requests to the tiki server. That means we have an external facing URL and the internal URL.

When users are simply browsing the tiki from "outside" everything works fine. However, if you try to login, after login, tiki returns/redirects to a URL with the internal server name in it.

Example: external is "help.mycompany.com" and internal is "websrv.mycompany.com". the external is proxied over to the websrv server. After login to tiki, it redirects to 'websrv.mycompany.com' which then breaks (as that is not accessible outside the company).

I've scoured all the files in the tiki directory for the internal name. I've looked everywhere I can think of in the control panel and not seen a hostname yet. I've even changed the actual internal servers name (hostname) to something else and rebooted and it still redirects (but that fails too as it continues to redirect to the "old" internal hostname 'websrv.mycompany.com" instead of the newly installed "test" name of "tikiwiki.mycompany.com" (name strictly chosen to be different and to help diagnose). I've confirmed the apache virtualhost has the "new" test name too. There are just no config files on the whole system (CentOS 5.11) that have the word 'websrv' in them.

So somewhere tiki has an idea what the server name is (or was) and after login, starts using it.

Can anyone direct me to where it is? I'm all for being yelled at if it's somewhere even remotely obvious. But I'm kinda concerned because after the upgrade, our content people can't reliably get logged in.

Any pointers/help would be appreciated.



posts: 3 United States

Well, I'm stupid.

It was the proxy server re-writing the request header as it passed it to the tiki server. I was digging all over holy hell looking for the server name in anything and everything. Thinking it was embedded in PHP (I was desperate), I wrote a simple PHP script to dump everything about the environment and saw the wrong hostname. Relatively short path from there to finding out that, by default, Apache re-writes the HOST passed in to the request when proxying. Enabled the option to preserve the original request headers and viola! No more problems.

Sorry for wasting anyones time


posts: 25 Germany


Ialso spent 2 days with that issue before I found your post. I tried:

ProxyPreserveHost On

but the result was:
404 The requested URL /mywiki/tiki-index.php was not found on this server

My workaround is now to patch mod-func-login_box.php and make login_url relative

Any help would be appreciated

Upcoming Events

1)  21 Mar 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
Tiki birthday
9)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting