File: node15.html

package info (click to toggle)
sympa 5.2.3-1.2%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 21,384 kB
  • ctags: 3,566
  • sloc: perl: 27,368; sh: 3,990; makefile: 1,366; ansic: 226; php: 105; lisp: 32
file content (349 lines) | stat: -rw-r--r-- 12,380 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>14. virtual host</TITLE>
<META NAME="description" CONTENT="14. virtual host">
<META NAME="keywords" CONTENT="sympa">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="sympa.css">

<LINK REL="next" HREF="node16.html">
<LINK REL="previous" HREF="node14.html">
<LINK REL="up" HREF="sympa.html">
<LINK REL="next" HREF="node16.html">
</HEAD>

<BODY TEXT="#000000" BGCOLOR="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html1179"
  HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1173"
  HREF="sympa.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1167"
  HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1175"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1177"
  HREF="node30.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1180"
  HREF="node16.html">15. Interaction between Sympa and other</A>
<B> Up:</B> <A NAME="tex2html1174"
  HREF="sympa.html">Sympa Mailing Lists Management Software version</A>
<B> Previous:</B> <A NAME="tex2html1168"
  HREF="node14.html">13. Authorization scenarios</A>
 &nbsp; <B>  <A NAME="tex2html1176"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1178"
  HREF="node30.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL>
<LI><A NAME="tex2html1181"
  HREF="node15.html#SECTION001510000000000000000">14.1 How to create a virtual host</A>
<LI><A NAME="tex2html1182"
  HREF="node15.html#SECTION001520000000000000000">14.2 robot.conf</A>
<UL>
<LI><A NAME="tex2html1183"
  HREF="node15.html#SECTION001521000000000000000">14.2.1 Robot customization</A>
</UL>
<BR>
<LI><A NAME="tex2html1184"
  HREF="node15.html#SECTION001530000000000000000">14.3 Managing multiple virtual hosts</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION001500000000000000000"></A>
    <A NAME="virtual-robot"></A>
<BR>
14. virtual host
</H1>

<P>
Sympa is designed to manage multiple distinct mailing list servers on
a single host with a single Sympa installation. Sympa virtual hosts
are like Apache virtual hosting. Sympa virtual host definition includes
a specific email address for the robot itself and its lists and also a virtual
http server. Each robot provides access to a set of lists, each list is
related to only one robot.

<P>
Most configuration parameters can be redefined for each robot except 
general Sympa installation parameters (binary and spool location, smtp engine,
antivirus plugging,...).

<P>
The virtual host name as defined in <I>Sympa</I> documentation and configuration file refers
to the Internet domaine of the virtual host.

<P>
Note that the main limitation of virtual hosts in Sympa is that you cannot create 
2 lists with the same name (local part) among your virtual hosts.

<P>

<H1><A NAME="SECTION001510000000000000000">
14.1 How to create a virtual host</A>
</H1>

<P>
You don't need to install several Sympa servers. A single <A NAME="9248"></A><TT>sympa.pl</TT> daemon
and one or more fastcgi servers can serve all virtual host. Just configure the 
server environment in order to accept the new domain definition.

<UL>
<LI><B>The DNS</B> must be configured to define a new mail exchanger record (MX) 
to route message to your server. A new host (A record) or alias (CNAME) are mandatory
to define the new web server.
</LI>
<LI>Configure your <B>MTA (sendmail, postfix, exim, ...)</B> to accept incoming 
messages for the new robot domain. Add mail aliases for the robot :

<P>
<I>Examples (with sendmail):</I> <PRE>
sympa@your.virtual.domain:      "| /home/sympa/bin/queue sympa@your.virtual.domain"
listmaster@your.virtual.domain: "| /home/sympa/bin/queue listmaster@your.virtual.domain"
bounce+*@your.virtual.domain:          "| /home/sympa/bin/bouncequeue sympa@your.virtual.domain"\\
</PRE>

<P>
</LI>
<LI>Define a <B>virtual host in your HTTPD server</B>. The fastcgi servers defined 
in the common section of you httpd server can be used by each virtual host. You don't 
need to run dedicated fascgi server for each virtual host.

<P>
<I>Examples:</I> <PRE>
FastCgiServer /home/sympa/bin/wwsympa.fcgi -processes 3 -idle-timeout 120
.....
&lt;VirtualHost 195.215.92.16&gt;
  ServerAdmin webmaster@your.virtual.domain
  DocumentRoot /var/www/your.virtual.domain
  ServerName your.virtual.domain

  &lt;Location /sympa&gt;
     SetHandler fastcgi-script
  &lt;/Location&gt;

  ScriptAlias /sympa /home/sympa/bin/wwsympa.fcgi

&lt;/VirtualHost&gt;
</PRE>

<P>
</LI>
<LI>Create a <A NAME="9251"></A><TT>/home/sympa/etc/your.virtual.domain/robot.conf</TT> configuration file for the virtual host. Its format is a subset of <A NAME="9254"></A><TT>sympa.conf</TT> and is described in the next section ; a sample <A NAME="9257"></A><TT>robot.conf</TT> is provided.

<P>
</LI>
<LI>Create a <A NAME="9260"></A><TT>/home/sympa/expl/your.virtual.domain/</TT> directory that will contain the virtual host mailing lists directories. This directory should have the  <I>sympa</I> user as its owner and must have read and write access for this user.

<P><PRE>
# su sympa -c 'mkdir /home/sympa/expl/your.virtual.domain'
# chmod 750 /home/sympa/expl/your.virtual.domain
</PRE>

<P>
</LI>
</UL>

<P>

<H1><A NAME="SECTION001520000000000000000">
14.2 robot.conf</A>
</H1>
A robot is named by its domain, let's say my.domain.organd defined by a directory 
<A NAME="9263"></A><TT>/home/sympa/etc/my.domain.org</TT>. This directory must contain at least a 
<A NAME="9266"></A><TT>robot.conf</TT> file. This files has the same format as  <A NAME="9269"></A><TT>/etc/sympa.conf</TT>
(have a look at robot.conf in the sample dir).
Only the following parameters can be redefined for a particular robot :

<P>

<UL>
<LI><A NAME="9272"></A><TT>http_host</TT> 
<BR>
This hostname will be compared with 'SERVER_NAME' environment variable in wwsympa.fcgi
	to determine the current Virtual Host. You can a path at the end of this parameter if
	you are running multiple virtual hosts on the same host. 
	<PRE>Examples: \\
	http_host  myhost.mydom
	http_host  myhost.mydom/sympa
</PRE>

<P>
</LI>
<LI><A NAME="9275"></A><TT>wwsympa_url</TT> 
<BR>
The base URL of WWSympa

<P>
</LI>
<LI><A NAME="9278"></A><TT>soap_url</TT> 
<BR>
The base URL of Sympa's SOAP server (if it is running ; see&nbsp;<A HREF="node12.html#soap">11</A>, page&nbsp;<A HREF="node12.html#soap"><IMG  ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A>)

<P>
</LI>
<LI><A NAME="9281"></A><TT>cookie_domain</TT>

<P>
</LI>
<LI><A NAME="9284"></A><TT>email</TT>

<P>
</LI>
<LI><A NAME="9287"></A><TT>title</TT>

<P>
</LI>
<LI><A NAME="9290"></A><TT>default_home</TT>

<P>
</LI>
<LI><A NAME="9293"></A><TT>create_list</TT>

<P>
</LI>
<LI><A NAME="9296"></A><TT>lang</TT>

<P>
</LI>
<LI><A NAME="9299"></A><TT>supported_lang</TT>

<P>
</LI>
<LI><A NAME="9302"></A><TT>log_smtp</TT>

<P>
</LI>
<LI><A NAME="9305"></A><TT>listmaster</TT>

<P>
</LI>
<LI><A NAME="9308"></A><TT>max_size</TT>

<P>
</LI>
<LI><A NAME="9311"></A><TT>css_path</TT>

<P>
</LI>
<LI><A NAME="9314"></A><TT>css_url</TT>

<P>
</LI>
<LI><A NAME="9317"></A><TT>logo_html_definition</TT>

<P>
</LI>
<LI><A NAME="9320"></A><TT>color_0</TT>, color_1 ... color_15

<P>
</LI>
<LI>deprecated color definition <A NAME="9323"></A><TT>dark_color</TT>, <A NAME="9326"></A><TT>light_color</TT>, <A NAME="9329"></A><TT>text_color</TT>, <A NAME="9332"></A><TT>bg_color</TT>, <A NAME="9335"></A><TT>error_color</TT>, <A NAME="9338"></A><TT>selected_color</TT>, <A NAME="9341"></A><TT>shaded_color</TT>

<P>
</LI>
</UL>

<P>
These settings overwrite the equivalent global parameter defined in <A NAME="9344"></A><TT>/etc/sympa.conf</TT>
for my.domain.orgrobot ; the main <A NAME="9347"></A><TT>listmaster</TT> still has privileges on Virtual
Robots though. The http_host parameter is compared by wwsympa with the SERVER_NAME
environment variable to recognize which robot is in used. 

<P>

<H2><A NAME="SECTION001521000000000000000">
14.2.1 Robot customization</A>
</H2>

<P>
In order to customize the web look and feel, you may edit the CSS definition. CSS are defined in a template named css.tt2. Any robot can use static css file for making Sympa web interface faster. Then you can edit this static definition and change web style. Please refer to  <A NAME="9350"></A><TT>css_path</TT> <A NAME="9353"></A><TT>css_url</TT>. You can also quickly introduce a logo in left top corner of all pages configuring <A NAME="9356"></A><TT>logo_html_definition</TT> parameter in robot.conf file. 

<P>
In addition, if needed, you can customize each virtual host using its set of templates and authorization scenarios. 

<P>
<A NAME="9359"></A><TT>/home/sympa/etc/my.domain.org/web_tt2/</TT>,
<A NAME="9362"></A><TT>/home/sympa/etc/my.domain.org/mail_tt2/</TT>, 
<A NAME="9365"></A><TT>/home/sympa/etc/my.domain.org/scenari/</TT> directories are searched when
loading templates or scenari before searching into <A NAME="9368"></A><TT>/home/sympa/etc</TT> and  <A NAME="9371"></A><TT>/home/sympa/bin/etc</TT>. This allows to define different privileges and a different GUI for a Virtual Host.

<P>

<H1><A NAME="SECTION001530000000000000000">
14.3 Managing multiple virtual hosts</A>
</H1>

<P>
If you are managing more than 2 virtual hosts, then you might cinsider moving all the mailing lists in the default
robot to a dedicated virtual host located in the <A NAME="9374"></A><TT>/home/sympa/expl/my.domain.org/</TT> directory. The main benefit of 
this organisation is the ability to define default configuration elements (templates or authorization scenarios) 
for this robot without inheriting them within other virtual hosts.

<P>
To create such a virtual host, you need to create <A NAME="9377"></A><TT>/home/sympa/expl/my.domain.org/</TT> and <A NAME="9380"></A><TT>/home/sympa/etc/my.domain.org/</TT> directories ; 
customize <A NAME="9383"></A><TT>host</TT>, <A NAME="9386"></A><TT>http_host</TT> and <A NAME="9389"></A><TT>wwsympa_url</TT> parameters in the <A NAME="9392"></A><TT>/home/sympa/etc/my.domain.org/robot.conf</TT> 
with the same values as the default robot (as defined in <A NAME="9395"></A><TT>sympa.conf</TT> and <A NAME="9398"></A><TT>wwsympa.conf</TT> files).

<P>

<HR>
<!--Navigation Panel-->
<A NAME="tex2html1179"
  HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html1173"
  HREF="sympa.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html1167"
  HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html1175"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html1177"
  HREF="node30.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1180"
  HREF="node16.html">15. Interaction between Sympa and other</A>
<B> Up:</B> <A NAME="tex2html1174"
  HREF="sympa.html">Sympa Mailing Lists Management Software version</A>
<B> Previous:</B> <A NAME="tex2html1168"
  HREF="node14.html">13. Authorization scenarios</A>
 &nbsp; <B>  <A NAME="tex2html1176"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html1178"
  HREF="node30.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
root
2006-10-20
</ADDRESS>
</BODY>
</HTML>