Software /
code /
prosody
Comparison
prosody.cfg.lua.dist @ 2982:0395f2f34bd5 0.6.2
prosody.cfg.lua.dist: Refactor the default config file based on feedback from confused users
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 14 Apr 2010 13:01:10 +0100 |
parent | 2829:7f22d9c384e1 |
child | 2984:3094166cfdd5 |
comparison
equal
deleted
inserted
replaced
2981:15a7afea7f59 | 2982:0395f2f34bd5 |
---|---|
1 -- Prosody Example Configuration File | 1 -- Prosody Example Configuration File |
2 -- | 2 -- |
3 -- If it wasn't already obvious, -- starts a comment, and all | 3 -- Information on configuring Prosody can be found on our |
4 -- text after it on a line is ignored by Prosody. | 4 -- website at http://prosody.im/doc/configure |
5 -- | |
6 -- Tip: You can check that the syntax of this file is correct | |
7 -- when you have finished by running: luac -p prosody.cfg.lua | |
8 -- If there are any errors, it will let you know what and where | |
9 -- they are, otherwise it will keep quiet. | |
5 -- | 10 -- |
6 -- The config is split into sections, a global section, and one | 11 -- The only thing left to do is rename this file to remove the .dist ending, and fill in the |
7 -- for each defined host that we serve. You can add as many host | |
8 -- sections as you like. | |
9 -- | |
10 -- Lists are written { "like", "this", "one" } | |
11 -- Lists can also be of { 1, 2, 3 } numbers, and other things. | |
12 -- Either commas, or semi-colons; may be used | |
13 -- as seperators. | |
14 -- | |
15 -- A table is a list of values, except each value has a name. An | |
16 -- example table would be: | |
17 -- | |
18 -- ssl = { key = "keyfile.key", certificate = "certificate.cert" } | |
19 -- | |
20 -- Whitespace (that is tabs, spaces, line breaks) is mostly insignificant, so | |
21 -- can | |
22 -- be placed anywhere that you deem fitting. | |
23 -- | |
24 -- Tip: You can check that the syntax of this file is correct when you have finished | |
25 -- by running: luac -p prosody.cfg.lua | |
26 -- If there are any errors, it will let you know what and where they are, otherwise it | |
27 -- will keep quiet. | |
28 -- | |
29 -- The only thing left to do is rename this file to remove the .dist ending, and fill in the | |
30 -- blanks. Good luck, and happy Jabbering! | 12 -- blanks. Good luck, and happy Jabbering! |
31 | 13 |
32 -- Server-wide settings go in this section | 14 |
33 Host "*" | 15 ---------- Server-wide settings ---------- |
16 -- Settings in this section apply to the whole server and are the default settings | |
17 -- for any virtual hosts | |
18 | |
19 -- This is a (by default, empty) list of accounts that are admins | |
20 -- for the server. Note that you must create the accounts separately | |
21 -- (see http://prosody.im/doc/creating_accounts for info) | |
22 -- Example: admins = { "user1@example.com", "user2@example.net" } | |
23 admins = { } | |
24 | |
25 -- This is the list of modules Prosody will load on startup. | |
26 -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too. | |
27 modules_enabled = { | |
28 | |
29 -- Generally required | |
30 "roster"; -- Allow users to have a roster. Recommended ;) | |
31 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. | |
32 "tls"; -- Add support for secure TLS on c2s/s2s connections | |
33 "dialback"; -- s2s dialback support | |
34 "disco"; -- Service discovery | |
34 | 35 |
35 -- This is a (by default, empty) list of accounts that are admins | 36 -- Not essential, but recommended |
36 -- for the server. Note that you must create the accounts separately | 37 "private"; -- Private XML storage (for room bookmarks, etc.) |
37 -- (see http://prosody.im/doc/creating_accounts for info) | 38 "vcard"; -- Allow users to set vCards |
38 -- Example: admins = { "user1@example.com", "user2@example.net" } | |
39 admins = { } | |
40 | 39 |
41 -- This is the list of modules Prosody will load on startup. | 40 -- Nice to have |
42 -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too. | 41 "legacyauth"; -- Legacy authentication. Only used by some old clients and bots. |
43 modules_enabled = { | 42 "version"; -- Replies to server version requests |
44 -- Generally required | 43 "uptime"; -- Report how long server has been running |
45 "roster"; -- Allow users to have a roster. Recommended ;) | 44 "time"; -- Let others know the time here on this server |
46 "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in. | 45 "ping"; -- Replies to XMPP pings with pongs |
47 "tls"; -- Add support for secure TLS on c2s/s2s connections | 46 "pep"; -- Enables users to publish their mood, activity, playing music and more |
48 "dialback"; -- s2s dialback support | 47 "register"; -- Allow users to register on this server using a client and change passwords |
49 "disco"; -- Service discovery | 48 |
50 | 49 -- Other specific functionality |
51 -- Not essential, but recommended | 50 --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. |
52 "private"; -- Private XML storage (for room bookmarks, etc.) | 51 --"console"; -- Opens admin telnet interface on localhost port 5582 |
53 "vcard"; -- Allow users to set vCards | 52 --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" |
54 | 53 --"httpserver"; -- Serve static files from a directory over HTTP |
55 -- Nice to have | 54 }; |
56 "legacyauth"; -- Legacy authentication. Only used by some old clients and bots. | |
57 "version"; -- Replies to server version requests | |
58 "uptime"; -- Report how long server has been running | |
59 "time"; -- Let others know the time here on this server | |
60 "ping"; -- Replies to XMPP pings with pongs | |
61 "pep"; -- Enables users to publish their mood, activity, playing music and more | |
62 "register"; -- Allow users to register on this server using a client and change passwords | |
63 | 55 |
64 -- Other specific functionality | 56 -- These modules are auto-loaded, should you |
65 --"posix"; -- POSIX functionality, sends server to background, enables syslog, etc. | 57 -- for (for some mad reason) want to disable |
66 --"console"; -- Opens admin telnet interface on localhost port 5582 | 58 -- them then uncomment them below |
67 --"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP" | 59 modules_disabled = { |
68 --"httpserver"; -- Serve static files from a directory over HTTP | 60 -- "presence"; |
69 }; | 61 -- "message"; |
62 -- "iq"; | |
63 }; | |
64 | |
65 -- Disable account creation by default, for security | |
66 -- For more information see http://prosody.im/doc/creating_accounts | |
67 allow_registration = false; | |
70 | 68 |
71 -- These modules are auto-loaded, should you | 69 -- These are the SSL/TLS-related settings. If you don't want |
72 -- for (for some mad reason) want to disable | 70 -- to use SSL/TLS, you may comment or remove this |
73 -- them then uncomment them below | 71 ssl = { |
74 modules_disabled = { | 72 key = "certs/localhost.key"; |
75 -- "presence"; | 73 certificate = "certs/localhost.cert"; |
76 -- "message"; | 74 } |
77 -- "iq"; | |
78 }; | |
79 | 75 |
80 -- Disable account creation by default, for security | 76 ----------- Virtual hosts ----------- |
81 -- For more information see http://prosody.im/doc/creating_accounts | 77 -- You need to add a VirtualHost entry for each domain you wish Prosody to serve. |
82 allow_registration = false; | 78 -- Settings under each VirtualHost entry apply *only* to that host. |
83 | |
84 -- These are the SSL/TLS-related settings. If you don't want | |
85 -- to use SSL/TLS, you may comment or remove this | |
86 ssl = { | |
87 key = "certs/localhost.key"; | |
88 certificate = "certs/localhost.cert"; | |
89 } | |
90 | 79 |
91 -- This allows clients to connect to localhost. No harm in it. | 80 VirtualHost "localhost" |
92 Host "localhost" | |
93 | 81 |
94 -- Section for example.com | 82 VirtualHost "example.com" |
95 -- (replace example.com with your domain name) | 83 enabled = false -- Remove this line to enable this host |
96 Host "example.com" | |
97 | |
98 enabled = false -- This will disable the host, preserving the config, but denying connections | |
99 | 84 |
100 -- Assign this host a certificate for TLS, otherwise it would use the one | 85 -- Assign this host a certificate for TLS, otherwise it would use the one |
101 -- set in the global section (if any). | 86 -- set in the global section (if any). |
102 -- Note that old-style SSL on port 5223 only supports one certificate, and will always | 87 -- Note that old-style SSL on port 5223 only supports one certificate, and will always |
103 -- use the global one. | 88 -- use the global one. |
104 ssl = { | 89 ssl = { |
105 key = "certs/example.com.key"; | 90 key = "certs/example.com.key"; |
106 certificate = "certs/example.com.crt"; | 91 certificate = "certs/example.com.crt"; |
107 } | 92 } |
108 | 93 |
109 -- Set up a MUC (multi-user chat) room server on conference.example.com: | 94 ------ Components ------ |
110 Component "conference.example.com" "muc" | 95 -- You can specify components to add hosts that provide special services, |
96 -- like multi-user conferences, and transports. | |
97 -- For more information on components, see http://prosody.im/doc/components | |
98 | |
99 ---Set up a MUC (multi-user chat) room server on conference.example.com: | |
100 --Component "conference.example.com" "muc" | |
101 | |
102 ---Set up an external component (default component port is 5347) | |
103 --Component "gateway.example.com" | |
104 -- component_secret = "password" |