diff options
author | Roland Reichwein <mail@reichwein.it> | 2020-05-03 12:01:13 +0200 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2020-05-03 12:01:13 +0200 |
commit | 21a066b4b972bd055b424a946ff1f80a939443c3 (patch) | |
tree | 177ece2787518f3e68bd073ebd887548f9672d79 /README.txt | |
parent | 4e699f552db264b9d988873f2189440280e821a7 (diff) |
Added redirect plugin, documentation
Diffstat (limited to 'README.txt')
-rw-r--r-- | README.txt | 173 |
1 files changed, 173 insertions, 0 deletions
@@ -9,6 +9,7 @@ Features * Virtual servers * Plugin interface * CGI interface +* FastCGI interface Configuration @@ -29,3 +30,175 @@ Configuration # systemctl status webserver or observe /var/log/syslog + + +Example Configuration +--------------------- + +An example configuration is included in the package. + +<webserver> + <user>www-data</user> + <group>www-data</group> + <threads>10</threads> + <plugin-directory>/usr/lib/webserver/plugins</plugin-directory> + <sites> + <site> + <name>reichwein.it</name> + <host>reichwein.it</host> + <host>www.reichwein.it</host> + <host>blog.reichwein.it</host> + <path requested="/"> + <plugin>static-files</plugin> + <target>/var/www/homepage</target> + </path> + <certpath>/etc/ssl/webserver/fullchain.pem</certpath> + <keypath>/etc/ssl/webserver/privkey.pem</keypath> + </site> + </sites> + <sockets> + <socket> + <address>127.0.0.1</address> + <port>80</port> + <protocol>http</protocol> + </socket> + <socket> + <address>::1</address> + <port>80</port> + <protocol>http</protocol> + </socket> + <socket> + <address>127.0.0.1</address> + <port>443</port> + <protocol>https</protocol> + </socket> + <socket> + <address>::1</address> + <port>443</port> + <protocol>https</protocol> + </socket> + </sockets> +</webserver> + + +HTTP Auth +--------- + +For every plugin configuration (subdir in directory tree), an "auth" +configuration can be added for HTTP AUTH (basic). E.g.: + + <auth login="reichwein" password="wfewqbjkjbw"/> + +Passwords are hashed with basic Unix crypt(). So don't make the configuration +file available to others. + +Passwords can be prepared by calling "webserver" with the parameter "-p": + +# webserver -p mypass3 +70cjNwWBtNpWw + + +Plugin Configuration +-------------------- + +Plugin: cgi +~~~~~~~~~~~ + +Configuration example: + + <path requested="/cgi-bin"> + <plugin>cgi</plugin> + <target>/usr/lib/webserver/cgi-bin</target> + </path> + + +Plugin: fcgi +~~~~~~~~~~~~ + +Configuration example: + + <path requested="/fcgi"> + <plugin>fcgi</plugin> + <target>127.0.0.1:9000</target> + </path> + + +Plugin: redirect +~~~~~~~~~~~~~~~~ + +Parameters: + + target: URL to redirect to + STATUS_CODE: Valid 3xx HTTP status code for redirection. Usually, one of: + 301 - Moved Permanently + 302 - Found (moved temporarily) + 303 - See Other + 307 - Temporary Redirect + 308 - Permanent Redirect + MESSAGE: Message included in reply, normally not visible in the protocol or to the user + +Configuration example: + + <path requested="/blog"> + <plugin>redirect</plugin> + <target>https://blog.reichwein.it/</target> + <STATUS_CODE>301</STATUS_CODE> + <MESSAGE>Redirecting to antcom.de ...</MESSAGE> + </path> + + +Plugin: static-files +~~~~~~~~~~~~~~~~~~~~ + +Configuration example: + + <path requested="/"> + <plugin>static-files</plugin> + <target>/var/www/homepage</target> + </path> + + +Plugin: statistics +~~~~~~~~~~~~~~~~~~ + +Configuration example: + + <path requested="/stats"> + <plugin>statistics</plugin> + <target></target> + </path> + + +Plugin: webbox +~~~~~~~~~~~~~~ + +This plugin needs a combination of static-files (for statically served parts) +and webbox plugins (for dynamic contents). + +Configuration example: + + <path requested="/webbox1"> + <plugin>static-files</plugin> + <target>/usr/lib/webbox/html</target> + </path> + <path requested="/webbox1/bin"> + <plugin>webbox</plugin> + <target>/home/rr/testbox</target> + <WEBBOX_NAME>Testbox1</WEBBOX_NAME> + <WEBBOX_READONLY>0</WEBBOX_READONLY> + <auth login="reichwein" password="wfewqbjkjbw"/> + </path> + + +Plugin: weblog +~~~~~~~~~~~~~~ + +Configuration example: + + <path requested="/blog"> + <plugin>weblog</plugin> + <target>/home/reichwein/testblog</target> + <WEBLOG_NAME>My Blog</WEBLOG_NAME> + <WEBLOG_KEYWORDS>Reichwein, Reichwein IT, Blog</WEBLOG_KEYWORDS> + </path> + |