068acdf9 |
1 | HOW TO CONFIGURE SQUIRRELMAIL WITH RUSSIAN APACHE |
8c086db6 |
2 | -------------------------------------------------- |
3 | |
223bb718 |
4 | This text is available in Russian at |
5 | http://www.mricon.com/SM/russian_apache.html |
6 | |
a48fbf9b |
7 | ***** |
8 | NOTE: Russian Apache will recode all attachments, even if they |
9 | are binary, thus corrupting them. To fix this problem, refer to |
10 | Russian Apache FAQ: http://apache.lexa.ru/faq.html#5 |
068acdf9 |
11 | Turn multipart form recoding off in your apache config. If you |
12 | don't, you're in for mucho trouble. |
a48fbf9b |
13 | ***** |
14 | |
8c086db6 |
15 | This howto is for people who are using Russian Apache and |
16 | who use charsets other than koi8-r for their source documents. |
17 | If you _do_ use KOI8-R as default encoding for all your source |
18 | documents, you don't need to do anything. Otherwise, here's |
19 | a very simple way to make this work. |
20 | |
21 | The general idea is to tell Russian Apache that everything |
22 | residing in the squirrel-mail directory is in koi8-r. This |
23 | way all input submitted by users will be automagically |
24 | converted by mod_charset from anything into koi8-r. |
25 | Squirrel-Mail will then correctly stamp it with |
26 | "Charset=koi8-r" and send off without any additional |
27 | conversion. |
28 | |
29 | There are two equally efficient ways to do it: |
30 | |
31 | |
32 | 1. THE HTTPD.CONF WAY. |
33 | ----------------------- |
34 | |
35 | In your httpd.conf, add the following declaration for the |
36 | server that handles the squirrel-mail: |
37 | |
38 | <Directory /path/to/your/squirrel-mail> |
39 | CharsetSourceEnc koi8-r |
40 | </Directory> |
41 | |
42 | Warning: If you use CharsetByExtension elsewhere, it will |
43 | override the CharsetSourceEnc directive. In that case you will |
44 | have to put this directive instead of the above: |
45 | |
46 | <Directory /path/to/your/squirrel-mail> |
47 | CharsetByExtension koi8-r .php |
48 | </Directory> |
49 | |
50 | It is advised to use the CharsetSourceEnc declaration instead |
51 | of the other one. Use the CharsetByExtension only if the |
52 | other fails. |
53 | |
54 | 2. THE .HTACCESS WAY (PREFERRED). |
55 | ---------------------------------- |
56 | |
57 | Create a .htaccess file in your squirrel-mail directory. In it, |
58 | simply put this line: |
59 | |
60 | CharsetSourceEnc koi8-r |
61 | |
62 | That's it. Note the warning about the ChatsetByExtension directive |
63 | in the previous section. If you used CharsetByExtension declaration |
64 | elsewhere and it's active for this server, then you will have to |
65 | put this line in your .htaccess instead: |
66 | |
67 | CharsetByExtension koi8-r .php |
68 | |
69 | But again, this is only if the CharsetSourceEnc fails. |
70 | |
71 | I mark this method "Preferred" simply because you don't have to |
72 | restart your server if you use .htaccess. However, if you've |
73 | specified "AllowOverride None" in your Server config, then you |
74 | will have to go with "the httpd.conf way". |
75 | |
76 | |
77 | If you have any questions or problems, please address them to |
78 | the squirrelmail-list@lists.sourceforge.net to have them |
79 | promptly answered. ;) |
80 | |
81 | -- |
82 | Konstantin Riabitsev (a.k.a. Graf) |
83 | graf@relhum.org |