we are running Confluence 3.5 standalone on an Ubuntu server. Apache forwards all requests on Port 80 to Confluence using mod_proxy_ajp, configured in an .htaccess file:
RewriteRule ^(.*)$ ajp://127.0.0.1:8009/$1 [P]
Tomcat is correctly configured with URIEncoding="UTF-8" and the Postgres database also uses UTF-8.
Now I created a test page with the title “Ümläüt–Test” and attach a file “Ümläüt–Test.txt” to it. This is what happens:
This does not make any sense to me, as the URL encoding seems to be correct (else it wouldn’t be possitble to access the page).
When I run a local Confluence 3.5 installation (using atlas-debug), everything behaves the same, except that point 2 instead of point 4 gives me the “Page not found” error, so in that case, passing the attachment name in the URL works but passing the page name doesn’t. Adding URIEncoding="UTF-8" to the server.xml does not change that (although I’m not quite sure if atlas-debug actually uses the settings from that file).
Strangely, we’ve got another server running Confluence 3.2.1_01, and there everything works.
All issues I can find that are related to this seem to be about Confluence 2. Is this a bug introduced in Confluence 3.5 or did I do anything wrong?
I found out something new: I uploaded a file called “ä.txt”. When I clicked on the link inside Confluence, the file name was correctly encoded as “%c3%a4.txt” in the URL. When I accessed it using “%e4.txt” (the ISO-8859-1 representation), the attachment successfully opened!
I found the problem now. Our server is running Ubuntu 8.04 LTS, whose Apache version (2.2.8) is quite old, a lot has been changed since then (see Changelog).
I tried several versions through and found out that the first version where it works is 2.2.12. The important change is probably this:
*) mod_rewrite: When evaluating a proxy rule in directory context, do
escape the filename by default. PR 46428 [Joe Orton]
In the conf/server.xml, in the <Connector> element do you have URIEncoding="UTF-8" ? This is on by default for the 8080 connector but probably not for the Ajp one. You could try it... I would have thought the ajp protocol handled this but worth a try.
Also, for the working confluence instance, is that configured to store attachments in the database or on the filesystem? Same question for the failing one...
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...
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!
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