user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/6] daemon: require absolute cert/key paths with --daemonize
  2022-08-01 21:24  6% [PATCH 0/6] flesh out more -netd funcionality Eric Wong
@ 2022-08-01 21:24  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-01 21:24 UTC (permalink / raw)
  To: meta

This is preparation for supporting loading new certs on SIGHUP.
---
 lib/PublicInbox/Daemon.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm
index 0392d15f..87a359e7 100644
--- a/lib/PublicInbox/Daemon.pm
+++ b/lib/PublicInbox/Daemon.pm
@@ -66,6 +66,7 @@ sub accept_tls_opt ($) {
 			my $host = '';
 			$path =~ s/\A([^:]+):// and $host = $1;
 			$x->{$host} = $path;
+			check_absolute($k, $path) if $daemonize;
 		}
 	}
 	my $ctx = IO::Socket::SSL::SSL_Context->new(%ctx_opt) or
@@ -283,6 +284,8 @@ sub daemonize () {
 		check_absolute('--stdout', $stdout);
 		check_absolute('--stderr', $stderr);
 		check_absolute('--pid-file', $pid_file);
+		check_absolute('--cert', $default_cert);
+		check_absolute('--key', $default_key);
 
 		chdir '/' or die "chdir failed: $!";
 	}

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/6] flesh out more -netd funcionality
@ 2022-08-01 21:24  6% Eric Wong
  2022-08-01 21:24  7% ` [PATCH 3/6] daemon: require absolute cert/key paths with --daemonize Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-08-01 21:24 UTC (permalink / raw)
  To: meta

These changes will allow public-inbox-netd to host multiple,
completely-unrelated .psgi apps within the same process via
psgi= as a per-listener option.  Having separate stdout/stderr
facsimiles is also supported via err= and out= keys (HTTP(S)
only has err= for $env->{'psgi.errors'}).

(public-inbox-{nntp,imap,pop3,http}d can actually do all that
-netd can do, too, the only difference is -netd has no default
port/protocol).

Further optimizations (PublicInbox::Config object sharing)
and reload improvements (TLS cert reload on SIGHUP) are on
the way...

Eric Wong (6):
  httpd: make internals slightly more generic
  daemon: support per-listener env, .psgi, out, err
  daemon: require absolute cert/key paths with --daemonize
  daemon: add diagnostics about inherited/bound listeners
  daemon: allow listening on well-known ports based on protocol
  daemon: share FDs for identical log paths

 Documentation/public-inbox-daemon.pod |  51 ++++++--
 Documentation/public-inbox-netd.pod   |  34 ++++--
 MANIFEST                              |   1 +
 lib/PublicInbox/Daemon.pm             | 168 +++++++++++++++++---------
 lib/PublicInbox/HTTP.pm               |  10 +-
 lib/PublicInbox/HTTPD.pm              |  60 +++++----
 lib/PublicInbox/IMAPD.pm              |   3 +-
 lib/PublicInbox/NNTPD.pm              |  25 ++--
 lib/PublicInbox/POP3D.pm              |  36 +++---
 t/alt.psgi                            |  17 +++
 t/httpd-corner.psgi                   |   8 +-
 t/httpd-corner.t                      |  39 +++++-
 12 files changed, 304 insertions(+), 148 deletions(-)
 create mode 100644 t/alt.psgi

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-01 21:24  6% [PATCH 0/6] flesh out more -netd funcionality Eric Wong
2022-08-01 21:24  7% ` [PATCH 3/6] daemon: require absolute cert/key paths with --daemonize Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).