Blob Blame History Raw
Patch by Robert Scheck <robert@fedoraproject.org> for prosody >= 0.12.3 which sets defaults
specific for Fedora and Red Hat Enterprise Linux (including CentOS Stream, and derivatives
like Rocky Linux), adds helpful comments about optional dependencies, and finally includes
some upstream recommendations.

--- prosody-0.12.3/prosody.cfg.lua.dist			2023-02-21 11:07:08.120425311 +0100
+++ prosody-0.12.3/prosody.cfg.lua.dist.config		2023-06-02 20:48:05.567458459 +0200
@@ -1,4 +1,4 @@
--- Prosody Example Configuration File
+-- Prosody XMPP Configuration File
 --
 -- Information on configuring Prosody can be found on our
 -- website at https://prosody.im/doc/configure
@@ -9,8 +9,7 @@
 -- If there are any errors, it will let you know what and where
 -- they are, otherwise it will keep quiet.
 --
--- The only thing left to do is rename this file to remove the .dist ending, and fill in the
--- blanks. Good luck, and happy Jabbering!
+-- Good luck, and happy Jabbering!
 
 
 ---------- Server-wide settings ----------
@@ -146,7 +145,8 @@
 -- through modules. An "sql" backend is included by default, but requires
 -- additional dependencies. See https://prosody.im/doc/storage for more info.
 
---storage = "sql" -- Default is "internal"
+--storage = "sql" -- Default is "internal" (Note: "sql" requires installed
+-- lua-dbi RPM package)
 
 -- For the "sql" backend, you can uncomment *one* of the below to configure:
 --sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
@@ -183,9 +183,11 @@
 -- Logging configuration
 -- For advanced logging see https://prosody.im/doc/logging
 log = {
-	info = "prosody.log"; -- Change 'info' to 'debug' for verbose logging
-	error = "prosody.err";
-	-- "*syslog"; -- Uncomment this for logging to syslog
+	-- Log everything of level "info" and higher (that is, all except "debug" messages)
+	-- to /var/log/prosody/prosody.log and errors also to /var/log/prosody/prosody.err
+	info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for verbose logging
+	error = "/var/log/prosody/prosody.err"; -- Log errors also to file
+	-- error = "*syslog"; -- Log errors also to syslog
 	-- "*console"; -- Log to the console, useful for debugging when running in the foreground
 }
 
@@ -203,13 +205,19 @@
 -- (from e.g. Let's Encrypt) see https://prosody.im/doc/certificates
 
 -- Location of directory to find certificates in (relative to main config file):
-certificates = "certs"
+certificates = "/etc/pki/prosody/"
+
+
+-- POSIX configuration
+-- For more info see https://prosody.im/doc/modules/mod_posix
+pidfile = "/run/prosody/prosody.pid";
+
 
 ----------- Virtual hosts -----------
 -- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
 -- Settings under each VirtualHost entry apply *only* to that host.
 
-VirtualHost "localhost"
+--VirtualHost "localhost"
 -- Prosody requires at least one enabled VirtualHost to function. You can
 -- safely remove or disable 'localhost' once you have added another.
 
@@ -239,6 +247,14 @@
 --	component_secret = "password"
 
 
+------ Additional config files ------
+-- For organizational purposes you may prefer to add VirtualHost and
+-- Component definitions in their own config files. This line includes
+-- all config files in /etc/prosody/conf.d/
+
+Include "conf.d/*.cfg.lua"
+
+
 ---------- End of the Prosody Configuration file ----------
 -- You usually **DO NOT** want to add settings here at the end, as they would
 -- only apply to the last defined VirtualHost or Component.
--- prosody-0.12.3/core/certmanager.lua			2023-02-21 11:07:08.120425311 +0100
+++ prosody-0.12.3/core/certmanager.lua.config		2023-06-02 20:48:05.567458459 +0200
@@ -202,7 +202,8 @@
 
 -- Built-in defaults
 local core_defaults = {
-	capath = "/etc/ssl/certs";
+	capath = "/etc/pki/tls/certs";
+	cafile = "/etc/pki/tls/certs/ca-bundle.crt";
 	depth = 9;
 	protocol = "tlsv1+";
 	verify = "none";
--- prosody-0.12.3/plugins/mod_admin_socket.lua		2023-02-21 11:07:08.120425311 +0100
+++ prosody-0.12.3/plugins/mod_admin_socket.lua.config	2023-06-02 20:48:05.568458466 +0200
@@ -21,7 +21,7 @@
 local adminstream = require "util.adminstream";
 local st = require "util.stanza";
 
-local socket_path = module:get_option_path("admin_socket", "prosody.sock", "data");
+local socket_path = module:get_option_path("admin_socket", "/run/prosody/prosody.sock", "data");
 
 local sessions = module:shared("sessions");
 
--- prosody-0.12.3/util/prosodyctl/shell.lua		2023-02-21 11:07:08.120425311 +0100
+++ prosody-0.12.3/util/prosodyctl/shell.lua.config	2023-06-02 20:48:05.568458466 +0200
@@ -127,7 +127,7 @@
 
 	client.prompt_string = config.get("*", "admin_shell_prompt");
 
-	local socket_path = path.resolve_relative_path(prosody.paths.data, opts.socket or config.get("*", "admin_socket") or "prosody.sock");
+	local socket_path = opts.socket or config.get("*", "admin_socket") or "/run/prosody/prosody.sock";
 	local conn = adminstream.connection(socket_path, client.listeners);
 	local ok, err = conn:connect();
 	if not ok then