Some Ajax queries by Confluence fail after configuring Confluence to run behind Apache

I'm using a sandbox installation of Confluence 4.2 running on Windows Server 2003 (our production installation is still running Confluence 3.x; we're about to switch over to 4.2).

I have followed the Atlassian documentation to configure this sandbox Confluence installation to run behind Apache (the Apache HTTP server).

That is, rather than accessing Confluence via the following URL (Tomcat port):


I use:


(I am using myserver as a placeholder for the actual server name.)

In the Tomcat server.xml file, I have set the path attribute of the <Context> element to the value "/wiki".

In the Apache HTTP server httpd.conf file, I have added the following directives:

# Custom configuration for Confluence and z/OSMF

ProxyRequests Off
ProxyPreserveHost On

SSLProxyEngine On
ProxyPass /zosmf/ https://fts2:32208/zosmf/
ProxyPassReverse /zosmf/ https://fts2:32208/zosmf/

&lt;Proxy *&gt;
    Order deny,allow
    Allow from all
ProxyPass /wiki http://localhost:8090/wiki
ProxyPassReverse /wiki http://localhost:8090/wiki
&lt;Location /confluence&gt;
    Order allow,deny
    Allow from all

(in addition to uncommenting the required LoadModule lines at the top of the file)

On the Confluence Administration page, I have set the Base URL to:


Prior to setting the base URL, the Firefox Firebug plugin reported many failed Ajax GET requests by Confluence.

However, now that I've done that, which I think completes the configuration, Confluence seems to be working fine, but Firebug is still reporting just a few failed Ajax GET requests by Confluence.

For example, Firebug shows that a GET request by Confluence for the following URL:


fails, unsurprisingly (note the absence of wiki/ between myserver/ and rest/) with a 404 Not Found error.

(When I say working fine, that's probably because I've not tried using the functionality specific to that failed shortcutlinkconfigurations GET.)

Firebug shows that many other GET requests by Confluence - with wiki/ in the URL - succeed. It's not the sea of red I got before updating the base URL on the Admin page.

Am I doing something wrong; have I missed some configuration step? Or are some parts of the Confluence code not honoring this style of base URL (that is, they don't expect the base URL to refer to a directory after the host and port), while others are?

Bug, or (my) user error?

(Note that I am deliberately using "wiki" for the path, as opposed to "confluence".)

P.S. The above question is a copy of a JIRA issue that I have just created. When I had finished creating the JIRA issue, JIRA asked me if I wanted to post the issue here (to Atlassian Answers). "Why not?" I thought, then I came here and saw that there were quite a few markup conversion issues (unconverted JIRA wiki markup), which I've fixed by manually editing (clearly, Atlassian have some work to do if they want to make the JIRA/Answers experience a little more seamless).

1 answer

1 vote
David Simpson Community Champion May 17, 2012

Are you sure you've set the Base URL correctly? Ensure that it's set to the same address and path as you're accessing it from using Apache.

If that's good, it might be nice to match the Tomcat context to be the same path used in Apache. You can do this by adapting the contextpath in confluence-install/conf/server.xml to /wiki.

Hi David,

Thanks for the answer.

I don't know how to be any more sure than I already am that I've set the Base URL correctly. As I mentioned, prior to doing that, I got a whole lot more Ajax failures than the few I get now.

I'm not sure what you mean by this:

adapting the contextpath in confluence-install/conf/server.xml to /wiki.

As I mentioned:

In the Tomcat server.xml file, I have set the path attribute of the <Context> element to the value "/wiki".

Is "adapting the contextpath" something else?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

252 views 2 10
Read article

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