Attachments with umlauts inaccessable
Asked by suedti1:

Hi Team,

With our Confluence 4.0.4 we get a "file not found" error if we wan to access an attachement with german umlauts.

It turned out that it is definitely a proxy problem. After bypassing the proxy it works.

This is my proxy configuration.

```
<Proxy *>Order deny,allowAllow from all</Proxy>ProxyRequests   OffProxyPreserveHost       OnProxyPass               /confluence     http://localhost:9092/confluenceProxyPassReverse        /confluence     http://localhost:9092/confluenceAddLanguage de .deAddCharset UTF-8 .utf8AddDefaultCharset utf-8AddCharset UTF-8 .action
```

Any Ideas how to find the solution?

THANKS

Philipp

For the records I also checked the following:

1.Formatting and International Settings:  
Indexing Language German  
Encoding UTF-8

2. Tomcat URI Encoding in Server XML:  

```
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="9092" minProcessors="5"                   maxProcessors="75"                   enableLookups="false" redirectPort="8445" acceptCount="10" debug="0" connectionTimeout="20000"                   useURIValidationHack="false" URIEncoding="UTF-8"/>
```

DB connection URL:  
jdbc:mysql://mysql.myserver.com/confluence?autoReconnect=true\&sessionVariables=storage_engine%3DInnoDB\&characterEncoding=utf8

3. Database Encoding  
Database Encoding:  

```
mysql> use confluence404Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedmysql> status--------------mysql  Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (x86_64) using readline 6.1Connection id:		11916284Current database:	confluence404Current user:		hagenmanagement@0.0.0.0SSL:			Not in useCurrent pager:		stdoutUsing outfile:		''Using delimiter:	;Server version:		5.1.49-3 (Debian)Protocol version:	10Connection:		mysql.myserver.com via TCP/IPServer characterset:	utf8Db     characterset:	utf8Client characterset:	latin1Conn.  characterset:	latin1TCP port:		3306Uptime:			320 days 1 hour 28 min 58 secThreads: 120  Questions: 814570352  Slow queries: 649  Opens: 1225141  Flush tables: 1  Open tables: 1024  Queries per second avg: 29.456--------------
```


Answers:
author: hsuhailah
body: #### How about try to remove the following and then try again: {#toc-hId-1309859164}

#### AddCharset UTF-8 .utf8 {#toc-hId--1242297797}

#### AddDefaultCharset utf-8 {#toc-hId-500512538}

#### AddCharset UTF-8 .action {#toc-hId--2051644423}

#### FYI, you should apply the same URIEncoding parameter as above to the AJP connector if you are using mod_jk, and add the following option to your Apache mod_jk configuration: {#toc-hId-1433976247}

|-----------------------------------------------------------------------------------------|
| `<``Connector` `port``=``"8009"` `protocol``=``"AJP/1.3"` `URIEncoding``=``"UTF-8"``/>` |

|---------------------------------------|
| `JkOptions +ForwardURICompatUnparsed` |

comments: author: childnode
body: Probably set explicit *AddDefaultCharset off* to ensure your Vhost ist configured correctly (even it's the default value).

Related issue with mod_rewrite, fixed in Apache 2.2.12+:  
https://answers.atlassian.com/questions/4790


author: Tomas Zahradnik
body: Hi Philipp,

it's true. Now I'm using these softwares:

```
httpd-2.2.22-win32-x86-openssl-0.9.8t.msiatlassian-confluence-4.3-x64.exemysql-5.5.25a-winx64.msi
```

On my previous server it was:

```
Apache-2.0.58MySQL-5.1
```

But during the testing I had the same configuration on my another new one server where it was working even with the same versions. At the end I used the latest versions.

I spent a lot of time and power to try to solve this problem and I can say that my time is more expensive then the new one server. At the end I have the new one server dedicated just for Confluence and I'm happy with that.

BR

Tomas


author: suedti
body: Hi,

Tomas, thanks a lot for the detailed information!

Maybe Apache has a higher version-number on the new server?

Is it still possible to track that?

Best regards,

Philipp


author: Tomas Zahradnik
body: Hi,

I'm using exactly the same configuration as in my previous server which wasn't working corretly.

So my Confluence is behind proxy created on Apache server and connected to the MySQL server. These servers are running on Win2008 server 64bit ENG.

Apache server configuration:

```
&lt;Proxy *&gt;        Order deny,allow        Allow from all&lt;/Proxy&gt;&lt;VirtualHost *:80&gt;    ServerAdmin    admin@domain    ServerName     confluence    ErrorLog       "logs/confluence-error.log"    CustomLog      "logs/confluence-access.log" common    ProxyRequests  Off    ProxyPreserveHost   On    ProxyPass           /    http://localhost:8090/    ProxyPassReverse    /    http://localhost:8090/        &lt;location /&gt;      Order deny,allow      Allow from all    &lt;/location&gt;&lt;/VirtualHost&gt;
```

Then configuration on /conf/server.xml

```
&lt;Server port="8000" shutdown="SHUTDOWN" debug="0"&gt;    &lt;Service name="Tomcat-Standalone"&gt;        &lt;Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8090" minProcessors="5"                   maxProcessors="75"                   enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000"                   useURIValidationHack="false" URIEncoding="UTF-8"/&gt;        &lt;Engine name="Standalone" defaultHost="localhost" debug="0"&gt;            &lt;Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false"&gt;                &lt;Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"&gt;                    &lt;Manager pathname="" /&gt;                &lt;/Context&gt;            &lt;/Host&gt;        &lt;/Engine&gt;    &lt;/Service&gt;&lt;/Server&gt;
```

And my setting from app_data/confluence/confluence.cfg.xml:

```
&lt;property name="hibernate.connection.url"&gt;jdbc:mysql://localhost/confluencedb?sessionVariables=storage_engine%3DInnoDB&amp;amp;useUnicode=true&amp;amp;characterEncoding=utf8&lt;/property&gt;
```

For the server I have DNS record 'confluence' and Apache doesn't serve any other web page.

Let me know if you will need any other configuration detail. But I'm afrait it doesn't help you because this configuration is the same as on my previous server where it doesn't work correctly.

Best regards and good luck.

Tomas


author: Tomas Zahradnik
body: Hallo,

I didn't solve this problem. So I had to build completly new one server with Confluence as a single server with dedicated MySQL. Now it is working.

Best regards

Tomas.

comments: author: suedti
body: Are you using a proxy? Which technique are you using? Could you show me your server.xml file?

Thanks

Philipp


author: suedti
body: No. We have the same Problem with an IIS Proxy. Without Proxy OK, with Proxy the files are inaccessible because special chars are not encoded properly.

philipp


author: Tomas Zahradnik
body: Hi,

unfortunatelly I haven't the solution of your problem but I have the same problem. Did you solve it yet?

Thanks

Tomas