Software /
code /
prosody
Annotate
prosody.cfg.lua.dist @ 518:127eb78cbf4a
Fix port number in mod_console instructions
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 03 Dec 2008 13:06:23 +0000 |
parent | 479:67b8d8260443 |
child | 524:3f9f67f1a106 |
rev | line source |
---|---|
465
9ab51c483cf3
Rename and update config. Update Makefile for this change.
Matthew Wild <mwild1@gmail.com>
parents:
377
diff
changeset
|
1 -- Prosody Example Configuration File |
377
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 -- If it wasn't already obvious, -- starts a comment, and all |
465
9ab51c483cf3
Rename and update config. Update Makefile for this change.
Matthew Wild <mwild1@gmail.com>
parents:
377
diff
changeset
|
4 -- text after it is ignored by Prosody. |
377
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 -- The config is split into sections, a global section, and one |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 -- for each defined host that we serve. You can add as many host |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 -- sections as you like. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 -- Lists are written { "like", "this", "one" } |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 -- Lists can also be of { 1, 2, 3 } numbers, etc. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 -- Either commas, or semi-colons; may be used |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 -- as seperators. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 -- A table is a list of values, except each value has a name. An |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 -- example would be: |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 -- logging = { type = "html", directory = "/var/logs", rotate = "daily" } |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 -- Whitespace (that is tabs, spaces, line breaks) is insignificant, so can |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 -- be placed anywhere |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 -- that you deem fitting. Youcouldalsoremoveitentirely,butforobviousrea |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 --sonsIdon'trecommendit. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 -- Tip: You can check that the syntax of this file is correct when you have finished |
465
9ab51c483cf3
Rename and update config. Update Makefile for this change.
Matthew Wild <mwild1@gmail.com>
parents:
377
diff
changeset
|
26 -- by running: luac -p prosody.cfg.lua |
377
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 -- If there are any errors, it will let you know what and where they are, otherwise it |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 -- will keep quiet. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 -- |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 -- The only thing left to do is rename this file to remove the .dist ending, and fill in the |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 -- blanks. Good luck, and happy Jabbering! |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 -- Global settings go in this section |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 Host "*" |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 |
465
9ab51c483cf3
Rename and update config. Update Makefile for this change.
Matthew Wild <mwild1@gmail.com>
parents:
377
diff
changeset
|
36 -- This is the list of modules Prosody will load on startup. |
9ab51c483cf3
Rename and update config. Update Makefile for this change.
Matthew Wild <mwild1@gmail.com>
parents:
377
diff
changeset
|
37 -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too. |
377
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 modules_enabled = { |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 "legacyauth"; -- Legacy authentication. Only used by some old clients and bots. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
41 "roster"; -- Allow users to have a roster. Recommended ;) |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
42 "register"; -- Allow users to register on this server using a client |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
43 "tls"; -- Add support for secure TLS on c2s/s2s connections |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
44 "vcard"; -- Allow users to set vCards |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
45 "private"; -- Private XML storage (for room bookmarks, etc.) |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
46 "version"; -- Replies to server version requests |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
47 "dialback"; -- s2s dialback support |
479
67b8d8260443
Add some example certificates and update the config to point to them
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
48 "disco"; -- Service discovery |
67b8d8260443
Add some example certificates and update the config to point to them
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
49 "ping"; -- XMPP Ping |
67b8d8260443
Add some example certificates and update the config to point to them
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
50 "time"; -- Let others know the time here |
67b8d8260443
Add some example certificates and update the config to point to them
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
51 "uptime"; -- Uptime reporting |
518
127eb78cbf4a
Fix port number in mod_console instructions
Matthew Wild <mwild1@gmail.com>
parents:
479
diff
changeset
|
52 "console"; -- telnet to port 5582 (needs console_enabled = true) |
377
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
53 }; |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
54 |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
55 -- These are the SSL/TLS-related settings. If you don't want |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
56 -- to use SSL/TLS, you may comment or remove this |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
57 ssl = { |
479
67b8d8260443
Add some example certificates and update the config to point to them
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
58 key = "certs/localhost.key"; |
67b8d8260443
Add some example certificates and update the config to point to them
Matthew Wild <mwild1@gmail.com>
parents:
465
diff
changeset
|
59 certificate = "certs/localhost.cert"; |
377
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
60 } |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
61 |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
62 -- This allows clients to connect to localhost. No harm in it. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
63 Host "localhost" |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
64 |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
65 -- Section for example.com |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
66 -- (replace example.com with your domain name) |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
67 Host "example.com" |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
68 -- Assign this host a certificate for TLS, otherwise it would use the one |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
69 -- set in the global section (if any). |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
70 -- Note that old-style SSL on port 5223 only supports one certificate, and will always |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
71 -- use the global one. |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
72 ssl = { |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
73 key = "certs/example.com.key"; |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
74 certificate = "certs/example.com.crt"; |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
75 } |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
76 |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
77 enabled = false -- This will disable the host, preserving the config, but denying connections |
12f483fe534b
Add new lxmppd.cfg.lua.dist example config file
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
78 |