From f554a3103c1a96bb8869448857ea74e2d2f78946 Mon Sep 17 00:00:00 2001 From: Nishi Date: Mon, 16 Sep 2024 13:57:39 +0000 Subject: [PATCH] add manpage git-svn-id: file:///raid/svn-personal/tewi/trunk@37 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Makefile | 8 +++- Manpage/Makefile | 11 +++++ Manpage/tewi.conf.5.tmpl | 89 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 Manpage/Makefile create mode 100644 Manpage/tewi.conf.5.tmpl diff --git a/Makefile b/Makefile index a34637d..9af3eba 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,9 @@ include Platform/$(PLATFORM).mk FLAGS = PWD=$(PWD) PLATFORM=$(PLATFORM) PREFIX=$(PREFIX) -.PHONY: all format clean ./Server ./Common ./Module +.PHONY: all format clean ./Server ./Common ./Module ./Manpage -all: ./Server ./Module +all: ./Server ./Module ./Manpage ./Server:: ./Common $(MAKE) -C $@ $(FLAGS) @@ -21,6 +21,9 @@ all: ./Server ./Module ./Common:: $(MAKE) -C $@ $(FLAGS) +./Manpage:: + $(MAKE) -C $@ $(FLAGS) + format: clang-format --verbose -i `find ./Server ./Common ./Module "(" -name "*.c" -or -name "*.h" ")" -and -not -name "strptime.*"` @@ -28,3 +31,4 @@ clean: $(MAKE) -C ./Server $(FLAGS) clean $(MAKE) -C ./Module $(FLAGS) clean $(MAKE) -C ./Common $(FLAGS) clean + $(MAKE) -C ./Manpage $(FLAGS) clean diff --git a/Manpage/Makefile b/Manpage/Makefile new file mode 100644 index 0000000..51f0bfc --- /dev/null +++ b/Manpage/Makefile @@ -0,0 +1,11 @@ +# $Id$ + +.PHONY: all clean + +all: tewi.conf.5 + +tewi.conf.5: tewi.conf.5.tmpl + sed "s%@PREFIX@%$(PREFIX)%g" tewi.conf.5.tmpl > $@ || rm -f $@ + +clean: + rm -f tewi.conf.5 diff --git a/Manpage/tewi.conf.5.tmpl b/Manpage/tewi.conf.5.tmpl new file mode 100644 index 0000000..da1df77 --- /dev/null +++ b/Manpage/tewi.conf.5.tmpl @@ -0,0 +1,89 @@ +.Dd 2024 Sep 16th +.Dt TEWI 8 +.Os +.Sh NAME +.Nm tewi , +.Nm tewi.conf +.Nd Tewi HTTPd +.Sh DESCRIPTION +.Nm +is a simple public domain HTTP daemon written in C. +.Sh CONFIGURATION +.Ss "General settings" +.Bl -tag -width 20 -compact +.It Pa "Listen" +Specifies the port(s) to be listened on. +.It Pa "DocumentRoot" +Specifies the document root. +.It Pa "LoadModule" +Loads the module. +.It Pa "MIMEType" +Specifies the MIME type for files. +\fBall\fR can be used instead of the extension if you want to make all extensions appear as same MIME. +Later rules will override the MIME. + +Example: + +.Vb 1 +\& MIMEType all application/octet-stream + +\& MIMEType .html text/html +.Ve + +.It Pa "BeginVirtualHost" +Begins the virtual host section. +.It Pa "EndVirtualHost" +Ends the virtual host section. +.El +.Ss "TLS/SSL settings" +.Bl -tag -width 20 -compact +.It Pa "ListenSSL" +Specifies the port(s) to be listened on, but with TLS/SSL. +.It Pa "SSLKey" +Specifies the TLS/SSL private key. +This works in the virtual host section too, and can be used to switch key depending on the virtual host. +.It Pa "SSLCertificate" +Specifies the TLS/SSL certificate. +This works in the virtual host section too, and can be used to switch certificate depending on the virtual host. +.El +.Ss "Access settings" +.Bl -tag -width 20 -compact +Default access is "Deny all". + +.It Pa "BeginDirectory" +Begins the directory section. +.It Pa "EndDirectory" +Ends the directory section. +.It Pa "Allow" +Allows the connection. Only works with \fBall\fR for now. +Will not work outside of the directory section. +.It Pa "Deny" +Denies the connection. Only works with \fBall\fR for now. +Will not work outside of the directory section. +.El +.Ss "Directory settings" +.Bl -tag -width 20 -compact +.It Pa "DirectoryIndex" +Specifies the directory index. +.It Pa "Readme" +Specifies the README file for directory listing. +.It Pa "Icon" +Sets the icon for the MIME type. +\fBall\fR can be used instead of the MIME if you want to make all MIMEs appear as same icon. +Later rules will override the icon. + +Example: + +.Vb 1 +\& Icon all /icons/unknown.png + +\& Icon text/* /icons/text.png +.Ve +.El +.Sh FILES +.Bl -tag -width @PREFIX@/etc/tewi.conf -compact +.It Pa @PREFIX@/etc/tewi.conf +Default path for the config +.El +.Sh AUTHORS +.An Nishi Aq Mt nishi@nishi.boats -- 2.43.0