Advertisement
Guest User

Untitled

a guest
Nov 26th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.26 KB | None | 0 0
  1. -- Prosody Example Configuration File
  2. --
  3. -- Information on configuring Prosody can be found on our
  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.
  10. --
  11. -- The only thing left to do is rename this file to remove the .dist ending, and fill in the
  12. -- blanks. Good luck, and happy Jabbering!
  13.  
  14.  
  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. -- Enable use of libevent for better performance under high load
  26. -- For more information see: http://prosody.im/doc/libevent
  27. --use_libevent = true;
  28.  
  29. -- This is the list of modules Prosody will load on startup.
  30. -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
  31. -- Documentation on modules can be found at: http://prosody.im/doc/modules
  32. modules_enabled = {
  33.  
  34. -- Generally required
  35. "roster"; -- Allow users to have a roster. Recommended ;)
  36. "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
  37. "tls"; -- Add support for secure TLS on c2s/s2s connections
  38. "dialback"; -- s2s dialback support
  39. "disco"; -- Service discovery
  40.  
  41. -- Not essential, but recommended
  42. "private"; -- Private XML storage (for room bookmarks, etc.)
  43. "vcard"; -- Allow users to set vCards
  44.  
  45. -- These are commented by default as they have a performance impact
  46. --"privacy"; -- Support privacy lists
  47. --"compression"; -- Stream compression (Debian: requires lua-zlib module to work)
  48.  
  49. -- Nice to have
  50. "version"; -- Replies to server version requests
  51. "uptime"; -- Report how long server has been running
  52. "time"; -- Let others know the time here on this server
  53. "ping"; -- Replies to XMPP pings with pongs
  54. "pep"; -- Enables users to publish their mood, activity, playing music and more
  55. "register"; -- Allow users to register on this server using a client and change passwords
  56.  
  57. -- Admin interfaces
  58. "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
  59. --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
  60.  
  61. -- HTTP modules
  62. "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
  63. --"http_files"; -- Serve static files from a directory over HTTP
  64.  
  65. -- Other specific functionality
  66. "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
  67. --"groups"; -- Shared roster support
  68. --"announce"; -- Send announcement to all online users
  69. --"welcome"; -- Welcome users who register accounts
  70. "watchregistrations"; -- Alert admins of registrations
  71. --"motd"; -- Send a message to users when they log in
  72. --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
  73. };
  74.  
  75. -- These modules are auto-loaded, but should you want
  76. -- to disable them then uncomment them here:
  77. modules_disabled = {
  78. -- "offline"; -- Store offline messages
  79. -- "c2s"; -- Handle client connections
  80. -- "s2s"; -- Handle server-to-server connections
  81. };
  82.  
  83. -- Disable account creation by default, for security
  84. -- For more information see http://prosody.im/doc/creating_accounts
  85. allow_registration = true;
  86.  
  87. -- Debian:
  88. -- send the server to background.
  89. --
  90. daemonize = true;
  91.  
  92. -- Debian:
  93. -- Please, don't change this option since /var/run/prosody/
  94. -- is one of the few directories Prosody is allowed to write to
  95. --
  96. pidfile = "/var/run/prosody/prosody.pid";
  97.  
  98. -- These are the SSL/TLS-related settings. If you don't want
  99. -- to use SSL/TLS, you may comment or remove this
  100. --ssl = {
  101. --key = "/etc/prosody/certs/localhost.key";
  102. --certificate = "/etc/prosody/certs/localhost.crt";
  103. --}
  104. ssl = {
  105. key = "...";
  106. certificate = "...";
  107. }
  108.  
  109. -- Force clients to use encrypted connections? This option will
  110. -- prevent clients from authenticating unless they are using encryption.
  111.  
  112. c2s_require_encryption = false
  113.  
  114. -- Force certificate authentication for server-to-server connections?
  115. -- This provides ideal security, but requires servers you communicate
  116. -- with to support encryption AND present valid, trusted certificates.
  117. -- NOTE: Your version of LuaSec must support certificate verification!
  118. -- For more information see http://prosody.im/doc/s2s#security
  119.  
  120. s2s_secure_auth = false
  121.  
  122. -- Many servers don't support encryption or have invalid or self-signed
  123. -- certificates. You can list domains here that will not be required to
  124. -- authenticate using certificates. They will be authenticated using DNS.
  125.  
  126. --s2s_insecure_domains = { "gmail.com" }
  127.  
  128. -- Even if you leave s2s_secure_auth disabled, you can still require valid
  129. -- certificates for some domains by specifying a list here.
  130.  
  131. --s2s_secure_domains = { "jabber.org" }
  132.  
  133. -- Select the authentication backend to use. The 'internal' providers
  134. -- use Prosody's configured data storage to store the authentication data.
  135. -- To allow Prosody to offer secure authentication mechanisms to clients, the
  136. -- default provider stores passwords in plaintext. If you do not trust your
  137. -- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
  138. -- for information about using the hashed backend.
  139.  
  140. authentication = "internal_plain"
  141.  
  142. -- Select the storage backend to use. By default Prosody uses flat files
  143. -- in its configured data directory, but it also supports more backends
  144. -- through modules. An "sql" backend is included by default, but requires
  145. -- additional dependencies. See http://prosody.im/doc/storage for more info.
  146.  
  147. --storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
  148. -- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
  149.  
  150. -- For the "sql" backend, you can uncomment *one* of the below to configure:
  151. --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
  152. --sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  153. --sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
  154.  
  155. -- Logging configuration
  156. -- For advanced logging see http://prosody.im/doc/logging
  157. --
  158. -- Debian:
  159. -- Logs info and higher to /var/log
  160. -- Logs errors to syslog also
  161. log = {
  162. -- Log files (change 'info' to 'debug' for debug logs):
  163. info = "/var/log/prosody/prosody.log";
  164. error = "/var/log/prosody/prosody.err";
  165. -- Syslog:
  166. { levels = { "error" }; to = "syslog"; };
  167. }
  168.  
  169. ----------- Virtual hosts -----------
  170. -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
  171. -- Settings under each VirtualHost entry apply *only* to that host.
  172.  
  173. VirtualHost "my-domain.com"
  174. enabled = true -- Remove this line to enable this host
  175.  
  176. -- Assign this host a certificate for TLS, otherwise it would use the one
  177. -- set in the global section (if any).
  178. -- Note that old-style SSL on port 5223 only supports one certificate, and will always
  179. -- use the global one.
  180. ssl = {
  181. key = "...";
  182. certificate = "...";
  183. }
  184.  
  185. ------ Components ------
  186. -- You can specify components to add hosts that provide special services,
  187. -- like multi-user conferences, and transports.
  188. -- For more information on components, see http://prosody.im/doc/components
  189.  
  190. ---Set up a MUC (multi-user chat) room server on conference.example.com:
  191. --Component "conference.example.com" "muc"
  192. Component "conference.my-domain.com" "muc"
  193. modules_enabled = {
  194. "muc_log",
  195. "mam_muc",
  196. }
  197. --storage = {
  198. -- This makes mod_mam_muc use the sql2 storage backend (others will use internal)
  199. -- which at the time of this writing is the only one supporting stanza archives
  200. --muc_log = "sql2";
  201. --}
  202. storage = "sql2"
  203. sql = {
  204. driver = "MySQL";
  205. database = "...";
  206. username = "...";
  207. password = "...?";
  208. host = "localhost";
  209. port = "3306";
  210. }
  211.  
  212. -- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
  213. --Component "proxy.example.com" "proxy65"
  214.  
  215. ---Set up an external component (default component port is 5347)
  216. --
  217. -- External components allow adding various services, such as gateways/
  218. -- transports to other networks like ICQ, MSN and Yahoo. For more info
  219. -- see: http://prosody.im/doc/components#adding_an_external_component
  220. --
  221. --Component "gateway.example.com"
  222. -- component_secret = "password"
  223.  
  224. ------ Additional config files ------
  225. -- For organizational purposes you may prefer to add VirtualHost and
  226. -- Component definitions in their own config files. This line includes
  227. -- all config files in /etc/prosody/conf.d/
  228.  
  229. Include "conf.d/*.cfg.lua"
  230.  
  231. muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
  232.  
  233. muc_log_all_rooms = true; -- set to true to force logging of all rooms
  234.  
  235. -- This is the largest number of messages that are allowed to be retrieved in one MAM request.
  236. max_archive_query_results = 1000;
  237.  
  238. -- This is the largest number of messages that are allowed to be retrieved when joining a room.
  239. max_history_messages = 1000;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement