Blob
Date:
Thu Sep 8 21:34:29 2022
UTC
Message:
change the flags to be consistent with other OpenBSD daemons
-d is `debug' (run in the foreground)
-f to load the configuration file
adjust regress and contrib accordingly
.\" Copyright (c) 2021, 2022 Omar Polo <op@omarpolo.com>.\".\" Permission to use, copy, modify, and distribute this software for any.\" purpose with or without fee is hereby granted, provided that the above.\" copyright notice and this permission notice appear in all copies..\".\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE..Dd September 8, 2022.Dt GMID 8.Os.Sh NAME.Nm gmid.Nd simple and secure Gemini server.Sh SYNOPSIS.Nm.Bk -words.Op Fl dhnVv.Op Fl D Ar macro Ns = Ns Ar value.Op Fl f Ar config.Op Fl P Ar pidfile.Ek.Sh DESCRIPTION.Nmis a simple and minimal gemini server that can serve static files,talk to FastCGI applications and act as a gemini reverse proxy.It can run without a configuration file with a limited set of featuresavailable..Pp.Nmrereads the configuration file when it receives.Dv SIGHUP ..PpThe options are as follows:.Bl -tag -width 14m.It Fl D Ar macro Ns = Ns Ar valueDefine.Ar macroto be set to.Ar valueon the command line.Overrides the definition of.Ar macroin the config file if present..It Fl dDebug mode.Do not daemonize and log to stderr..It Fl f Ar configSpecifies the configuration file.The default is.Pa /etc/gmid.conf ..It Fl h , Fl -helpPrint the usage and exit..It Fl nCheck that the configuration is valid, but don't start the server.If specified two or more time, dump the configuration in addition toverify it..It Fl P Ar pidfileWrite daemon's pid to the given location..Ar pidfilewill also act as lock: if another process is holding a lock on thatfile,.Nmwill refuse to start..It Fl V , Fl -versionPrint the version and exit..It Fl vVerbose mode.Multiple.Fl voptions increase the verbosity..El.Sh LOGGINGMessages and requests are logged by.Xr syslog 3using the.Dv DAEMONfacility or printed on.Em stderr ..PpRequests are logged with the.Dv NOTICEseverity.Each request log entry has the following fields, separated bywhitespace:.Pp.Bl -bullet -compact.ItClient IP address and the source port number, separated by a colon.It.Sy GETkeyword.ItRequest URL.ItResponse status.ItResponse meta.El.Sh EXAMPLESTo run.Nma configuration file and a X.509 certificate must be provided.A self-signed certificate, which are commonly used in the Geminispace,can be generated using for e.g.\&.Xr openssl 1 :.Bd -literal -offset indent# openssl req \-x509 \-newkey rsa:4096 \-nodes \e\-keyout /etc/ssl/private/example.com.key \e\-out /etc/ssl/example.com.pem \e\-days 365 \-subj "/CN=example.com"# chmod 600 /etc/ssl/example.com.crt# chmod 600 /etc/ssl/private/example.com.key.Ed.PpThen.Nmcan be started with.Bd -literal -offset indent# gmid -c /etc/gmid.conf.Ed.Sh SEE ALSO.Xr gmid.conf 5.Sh ACKNOWLEDGEMENTS.Nmuses the.Dq Flexible and EconomicalUTF-8 decoder written by.An Bjoern Hoehrmann ..Sh AUTHORS.An -nosplitThe.Nmprogram was written by.An Omar Polo Aq Mt op@omarpolo.com ..Sh CAVEATS.Bl -bullet.ItAll the root directories are opened during the daemon startup; if aroot directory is deleted and then re-created,.Nmwon't be able to serve files inside that directory until a restart.This restriction only applies to the root directories and not theircontent..Ita %2F sequence is indistinguishable from a literal slash: this is notRFC3986-compliant..Ita %00 sequence is treated as invalid character and thus rejected..El
Omar Polo