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