Confluence Apache Tomcat Configuration?

Background:

We have a couple of user spaces getting served via. confluence hosted in our internal server [FQDN: "xyzwiki.xyz.org"] running on port 80 accessible externally like "xyzwiki.xyz.org". We have a link to this userspace like this - "http://link.xyz.org/dashboard.action" on another domain website and we are trying to see if confluence can redirect / rewrite such http requests immediately to a completely different url like this -> http://abc.org/community/psyclink-_the_practice_wiki. [URL sample formats are important]

NOTE - We are in a situation where-in we are unable to simple make a change to the source url that is pointing to "http://link.xyz.org/dashboard.action" to be http://abc.org/community/psyclink-_the_practice_wiki for various reasons. Hence, I'm posting this question to this group!

Currently, the "link.xyz.org" is a cname in DNS to "xyzwiki.apa.org" which is the "server node name" on which the confluence instance is hosted.

Context:

All http requests to "http://link.xyz.org/dashboard.action" needs to be redirected to http://abc.org/community/psyclink-_the_practice_wiki. Is there a configuration in Tomcat where-in we can define this redirect? We ask as we have a standalone confluence instance running with no customized configurations. We want to redirect users to another URL only when they acces the link User space - "http://link.xyz.org/dashboard.action".

We have already read the following KB articles in confluence website
<font>http://confluence.atlassian.com/display/CONF31/Using+Apache+with+mod_proxy</font>

We read through the KB articles and they discuss about URL rewrites and redirects for confluence and Jira internally and externally with confluence in the url. In this context, we want to know if the complete url for a single user space can be redirected elsewhere using Apache Tomcat that ships with Confluence Standalone, All http requests to "http://psyclink.apa.org/dashboard.action" needs to be redirected to http://apacommunities.org/community/psyclink-_the_practice_wiki. Any inputs please?

2 answers

1 accepted

0 votes
Accepted answer

A really ugly (but simple) way of doing this is with a meta refresh

Login to http://link.xyz.org/dashboard.action as a Confluence Administrator and select Browse -> Confluence Admin -> Look and Feel -> Custom HTML and at the end of the HEAD section add:

<meta http-equiv="refresh" content="0; url=http://abc.org/community/psyclink-_the_practice_wiki">

Does that do what you want?

Thanks Andrew. We will look into the custom html options for re-directs based on space ids. Thanks for your time!

Regards

Sathish

Just a word of warning, the meta refresh will redirect every request to the link.xyz.org Confluence instance to the abc.org Confluence instance so be sure that's what you want because you might have trouble getting back in to Confluence Admin on link.xyz.org.

Got it Andrew. That's why I mentioned we will look into the custom html options for "re-directs based on space ids" if possible. Thank you.

Ah ok, then rather than Browse -> Confluence Admin you could do Browse -> Space Admin -> Layout -> Main Layout -> Create custom and at the meta tag before the </head> tag there. That will just affect the individual spaces that you choose to put the tag into rather than the entire Confluence instance.

Thanks Andrew. That helps!

There is too much information and no clear question.

> we want to know if the complete url for a single user space can be redirected elsewhere using Apache Tomcat

I doubt thats possible, even if you managed it, as soon as the user navigated away, what then I guess it just breaks?

Creating a full site redirect with a reverse proxy can work, but youll need to update your 'confluence' baseurl to be the external url, or I think the scripts wont download.

Hi Andy,

Thanks for your reply!

Again, we have a link to this userspace like this - "http://link.xyz.org/dashboard.action" on another external domain website [similar to Jive] and we are trying to see if confluence can redirect its inital http requests to only that USERSPACE immediately to this completely different external website url like this -> http://abc.org/community/psyclink-_the_practice_wiki. [URL sample formats are important]. Same userspace pages exist in both these websites [Export/Import Completed] so I believe there is no need for a rewrite but just an initial reditect for this particular userspace in the entire confluence instance. Is that a possible configuration in Tomcat and how do we do that? If this not possible, please let me know and I will look for a possible code deployment. Thank you.

Regards

Sathish

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,008 views 14 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you