servHTTP.v2

command module
v0.0.0-...-adc3592 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

README

servHTTP.v2

My very simple web server.

Installation

curl https://raw.githubusercontent.com/HuguesGuilleus/servHTTP.v2/master/install.bash | bash -s

Configuration

File /etc/servHTTP.ini or the first args.

General

; The log directory, each day a new file a created.
log = /var/log/servHTTP/
; disable the TLS listen and load certificates, use it when you don't have them.
notls = false
addr = :80
addrtls = :443
chalenge = /var/letsencrypt

Certificate

[!cert.xxx]
key = ...
crt = ...

Host

; File handler
[www.example.com]
; Two option for static file handler
/ = /var/www/
/ = file /var/www/
; you can define directory index template. I't Go HTML template that is executed
; on a slice of os.FileInfo
index = /path/to/template

; redirect handler
[example.com]
/ = redirect https://www.example.com

; Reverse proxy handler (work with web socket)
[reverse.example.com]
/ = reverse http://localhost:3000

; You can also define for each host, specific page for error
e404 = /path/to/error
e502 = /path/to/error

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL