aluisyo

prosody.cfg.lua

Mar 15th, 2016
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.08 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: prosodyctl check config
  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@localhost", "[email protected]" }
  23.  
  24. -- Enable use of libevent for better performance under high load
  25. -- For more information see: http://prosody.im/doc/libevent
  26. use_libevent = true;
  27.  
  28.  
  29. cross_domain_bosh = "*";
  30. cross_domain_websocket = true;
  31. consider_websocket_secure = true;
  32.  
  33. smacks_hibernation_time = 300;
  34.  
  35. default_archive_policy = true; -- other options are false or "roster";
  36. max_archive_query_results = 500;
  37.  
  38. -- This is the list of modules Prosody will load on startup.
  39. -- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
  40. -- Documentation on modules can be found at: http://prosody.im/doc/modules
  41. modules_enabled = {
  42.  
  43. -- Generally required
  44. "offline";
  45. "posix";
  46. "roster"; -- Allow users to have a roster. Recommended ;)
  47. "saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
  48. "tls"; -- Add support for secure TLS on c2s/s2s connections
  49. "dialback"; -- s2s dialback support
  50. "disco"; -- Service discovery
  51.  
  52. -- Not essential, but recommended
  53. "private"; -- Private XML storage (for room bookmarks, etc.)
  54. "vcard"; -- Allow users to set vCards
  55.  
  56. -- These are commented by default as they have a performance impact
  57. --"blocklist"; -- Support privacy lists
  58. "compression"; -- Stream compression (Debian: requires lua-zlib module to work)
  59. "admin_web";
  60. "blocklist";
  61. "pastebin";
  62. "http";
  63. "blocking";
  64. "http_index";
  65. "munin";
  66. "csi";
  67. "bidi";
  68. "register_web";
  69. "auto_accept_subscriptions";
  70. "cloud_notify";
  71. "lastactivity";
  72. "version"; -- Replies to server version requests
  73. "uptime"; -- Report how long server has been running
  74. "time"; -- Let others know the time here on this server
  75. "ping"; -- Replies to XMPP pings with pongs
  76. "pep"; -- Enables users to publish their mood, activity, playing music and more
  77. "register"; -- Allow users to register on this server using a client and change passwords
  78.  
  79. -- Admin interfaces
  80. "admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
  81. --"admin_telnet"; -- Opens telnet console interface on localhost port 5582
  82.  
  83. -- HTTP modules
  84. "bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
  85. "http_files"; -- Serve static files from a directory over HTTP
  86.  
  87. -- Other specific functionality
  88. --"groups"; -- Shared roster support
  89. "announce"; -- Send announcement to all online users
  90. "welcome"; -- Welcome users who register accounts
  91. "watchregistrations"; -- Alert admins of registrations
  92. "motd"; -- Send a message to users when they log in
  93. --"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
  94. "mam";
  95. "websocket";
  96. "carbons";
  97. "smacks";
  98. "idlecompat";
  99. "mam_archive";
  100. archive_conversation_interval = 86400; -- defined in seconds. One day by default
  101. storage = {
  102. archive2 = "sql";
  103. };
  104.  
  105. "offline";
  106. --"turncredentials";
  107. "http_altconnect";
  108. --"auth_external";
  109. };
  110.  
  111.  
  112. -- These modules are auto-loaded, but should you want
  113. -- to disable them then uncomment them here:
  114. modules_disabled = {
  115. -- "offline"; -- Store offline messages
  116. -- "c2s"; -- Handle client connections
  117. -- "s2s"; -- Handle server-to-server connections
  118. -- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
  119. };
  120.  
  121. -- Disable account creation by default, for security
  122. -- For more information see http://prosody.im/doc/creating_accounts
  123. allow_registration = true;
  124.  
  125. -- Debian:
  126. -- send the server to background.
  127. --
  128. daemonize = true;
  129.  
  130. -- Debian:
  131. -- Please, don't change this option since /var/run/prosody/
  132. -- is one of the few directories Prosody is allowed to write to
  133. --
  134. pidfile = "/var/run/prosody/prosody.pid";
  135.  
  136. -- These are the SSL/TLS-related settings. If you don't want
  137. -- to use SSL/TLS, you may comment or remove this
  138. ssl = {
  139. key = "/usr/local/etc/prosody/certs/siqchat.tk.key";
  140. certificate = "/usr/local/etc/prosody/certs/siqchat.tk.crt";
  141. }
  142.  
  143. -- Force clients to use encrypted connections? This option will
  144. -- prevent clients from authenticating unless they are using encryption.
  145.  
  146. c2s_require_encryption = true
  147.  
  148. -- Force certificate authentication for server-to-server connections?
  149. -- This provides ideal security, but requires servers you communicate
  150. -- with to support encryption AND present valid, trusted certificates.
  151. -- NOTE: Your version of LuaSec must support certificate verification!
  152. -- For more information see http://prosody.im/doc/s2s#security
  153.  
  154. s2s_secure_auth = true
  155.  
  156. -- Many servers don't support encryption or have invalid or self-signed
  157. -- certificates. You can list domains here that will not be required to
  158. -- authenticate using certificates. They will be authenticated using DNS.
  159.  
  160. s2s_insecure_domains = { "gmail.com", "emevth.no-ip.biz" }
  161.  
  162. -- Even if you leave s2s_secure_auth disabled, you can still require valid
  163. -- certificates for some domains by specifying a list here.
  164.  
  165. s2s_secure_domains = { "jabber.org", "movim.eu", "emevth.no-ip.biz" }
  166.  
  167. -- Select the authentication backend to use. The 'internal' providers
  168. -- use Prosody's configured data storage to store the authentication data.
  169. -- To allow Prosody to offer secure authentication mechanisms to clients, the
  170. -- default provider stores passwords in plaintext. If you do not trust your
  171. -- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
  172. -- for information about using the hashed backend.
  173.  
  174. authentication = "internal_plain"
  175.  
  176. --Include '/etc/prosody/prosody-ldap.cfg.lua'
  177.  
  178. -- Select the storage backend to use. By default Prosody uses flat files
  179. -- in its configured data directory, but it also supports more backends
  180. -- through modules. An "sql" backend is included by default, but requires
  181. -- additional dependencies. See http://prosody.im/doc/storage for more info.
  182.  
  183. default_storage = "sql"
  184. --storage = "sql" -- Default is "internal" (Debian: "sql" requires one of the
  185. -- lua-dbi-sqlite3, lua-dbi-mysql or lua-dbi-postgresql packages to work)
  186.  
  187. -- For the "sql" backend, you can uncomment *one* of the below to configure:
  188. --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
  189. sql = { driver = "MySQL", database = "prosody", username = "root", password = "koobec360", host = "localhost" }
  190. --sql = { driver = "MySQL", database = "{{DB_NAME}}", username = "{{root}}", password = "{{koobec360}}", host = "{{localhost}}" }
  191.  
  192. -- Logging configuration
  193. -- For advanced logging see http://prosody.im/doc/logging
  194. --
  195. -- Debian:
  196. -- Logs info and higher to /var/log
  197. -- Logs errors to syslog also
  198. log = {
  199. info = "*console";
  200. -- Log files (change 'info' to 'debug' for debug logs):
  201. debug = "/var/log/prosody/prosody.log";
  202. error = "/var/log/prosody/prosody.err";
  203. -- Syslog:
  204. { levels = { "error" }; to = "syslog"; };
  205. }
  206.  
  207. ----------- Virtual hosts -----------
  208. -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
  209. -- Settings under each VirtualHost entry apply *only* to that host.
  210.  
  211. VirtualHost "siqchat.tk"
  212. -- enabled = false -- Remove this line to enable this host
  213.  
  214. -- Assign this host a certificate for TLS, otherwise it would use the one
  215. -- set in the global section (if any).
  216. -- Note that old-style SSL on port 5223 only supports one certificate, and will always
  217. -- use the global one.
  218.  
  219.  
  220.  
  221. ------ Components ------
  222. -- You can specify components to add hosts that provide special services,
  223. -- like multi-user conferences, and transports.
  224. -- For more information on components, see http://prosody.im/doc/components
  225.  
  226. ---Set up a MUC (multi-user chat) room server on conference.localhost:
  227. Component "chat.siqchat.tk" "muc"
  228. modules_enabled = { "pastebin" }
  229. modules_enabled = {
  230. "mam_muc",
  231. }
  232.  
  233. storage = {
  234. muc_log = "sql"; -- Requires 0.10 or later
  235. }
  236.  
  237. muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
  238.  
  239. muc_log_all_rooms = false; -- set to true to force logging of all rooms
  240.  
  241. -- This is the largest number of messages that are allowed to be retrieved in one MAM request.
  242. max_archive_query_results = 20;
  243.  
  244. -- This is the largest number of messages that are allowed to be retrieved when joining a room.
  245. max_history_messages = 1000;
  246.  
  247. name = "The siqchat chatrooms server"
  248. restrict_room_creation = "local";
  249. max_history_messages = 50; -- This is the largest number of messages that are allowed to be retrieved when joining a room
  250. max_archive_query_results = 50; -- This is the largest number of messages that are allowed to be retrieved in one MAM request
  251. muc_log_by_default = true; -- Enable logging by default (can be disabled in room config)
  252. muc_log_all_rooms = true; -- set to true to force logging of all rooms
  253. ssl = {
  254. key = "/usr/local/etc/prosody/certs/siqchat.tk.key";
  255. certificate = "/usr/local/etc/prosody/certs/siqchat.tk.crt";
  256. }
  257.  
  258.  
  259. -- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
  260. --Component "proxy.openport.io" "proxy65"
  261. --modules_enabled = {
  262. --"http_upload";
  263. --}
  264. --http_upload_file_size_limit = 10 * 1024 * 1024 -- this is 10MB in bytes
  265. --http_upload_path = "/root/suzyo"
  266. ---Set up an external component (default component port is 5347)
  267. --
  268. -- External components allow adding various services, such as gateways/
  269. -- transports to other networks like ICQ, MSN and Yahoo. For more info
  270. -- see: http://prosody.im/doc/components#adding_an_external_component
  271. --
  272. --Component "gateway.localhost"
  273. -- component_secret = "password"
  274. Component "[email protected]" "admin_message"
  275.  
  276. Component "pubsub.siqchat.tk" "pubsub"
  277. name = "The siqchat pubsub server"
  278.  
  279. Component "search.siqchat.tk" "vjud"
  280. name = "The siqchat search server"
  281.  
  282.  
  283. Component "upload.siqchat.tk" "http_upload"
  284. name = "The siqchat Upload server"
  285. http_upload_file_size_limit = 10 * 1024 * 1024 -- this is 10MB in bytes
  286. http_upload_path = "/var/lib/prosody/"
  287. ssl = {
  288. key = "/usr/local/etc/prosody/certs/siqchat.tk.key";
  289. certificate = "/usr/local/etc/prosody/certs/siqchat.tk.crt";
  290. }
  291.  
  292. ------ Additional config files ------
  293. -- For organizational purposes you may prefer to add VirtualHost and
  294. -- Component definitions in their own config files. This line includes
  295. -- all config files in /etc/prosody/conf.d/
  296.  
  297. --Include "conf.d/*.cfg.lua"
Advertisement
Add Comment
Please, Sign In to add comment