server¶
vb server|ui [OPTIONS] [REPOSITORY]
Description¶
Open a socket and begin listening and responding to HTTP requests on
TCP port 8080, or on any other TCP port defined by the -P or
--port option. The optional REPOSITORY argument is the name of the
VisionByte repository to be served. The REPOSITORY argument may be omitted
if the working directory is within an open check-out, in which case the
repository associated with that check-out is used.
The ui command automatically starts a web browser after initializing the web server. The ui command also binds to 127.0.0.1 and so will only process HTTP traffic from the local machine.
If REPOSITORY is a directory name which is the root of a check-out, then use the repository associated with that check-out. This only works for the vb ui command, not the vb server command.
If REPOSITORY begins with a HOST: or USER@HOST: prefix, then
the command is run on the remote host specified and the results are
tunneled back to the local machine via SSH. This feature only works for
the vb ui command, not the vb server command. The name of the
vb executable on the remote host is specified by the --vbcmd
option, or if there is no --vbcmd, it first tries vb and if it
is not found in the default $PATH set by SSH on the remote, it then adds
$HOME/bin:/usr/local/bin:/opt/homebrew/bin to the PATH and tries again to
run vb.
REPOSITORY may also be a directory (aka folder) that contains one or
more repositories with names ending in .vbyte. In this case, a
prefix of the URL pathname is used to search the directory for an
appropriate repository. To thwart mischief, the pathname in the URL must
contain only alphanumerics, _, /, -, and ., and no - may
occur after /, and every . must be surrounded on both sides by
alphanumerics. Any pathname that does not satisfy these constraints
results in a 404 error. Files in REPOSITORY that match the comma-separated
list of glob patterns given by --files and that have known suffixes
such as .txt or .html or .jpeg and do not match the pattern
*.vbyte* will be served as static content. With the ui command,
the REPOSITORY can only be a directory if the --notfound option is
also present.
For the special case REPOSITORY name of /, the global configuration
database is consulted for a list of all known repositories. The --repolist
option is implied by this special case. The vb ui / command is
equivalent to vb all ui. To see all repositories owned by user
on machine remote via ssh, run vb ui user@remote:/.
By default, the ui command provides full administrative access without
having to log in. This can be disabled by turning off the localauth
setting. Automatic login for the server command is available if the
--localauth option is present and the localauth setting is off and the
connection is from localhost. The ui command also enables --repolist
by default.
Options¶
- --acme¶
Deliver files from the
.well-knownsubdirectory
- --baseurl URL¶
Use URL as the base (useful for reverse proxies)
- --cert FILE¶
Use TLS (HTTPS) encryption with the certificate (the fullchain.pem) taken from FILE.
- --chroot DIR¶
Use directory for chroot instead of repository path
- --ckout-alias NAME¶
Treat URIs of the form /doc/NAME/… as if they were /doc/ckout/…
- --create¶
Create a new REPOSITORY if it does not already exist
- --errorlog FILE¶
Append HTTP error messages to FILE
- --extpage FILE¶
Shortcut for “
--extroot DIR--page ext/TAIL” where DIR is the directory holding FILE and TAIL is the filename at the end of FILE. Only works for ui.
- --extroot DIR¶
Document root for the /ext extension mechanism
- --files GLOBLIST¶
Comma-separated list of glob patterns for static files
- --vbcmd PATH¶
The pathname of the
vbexecutable on the remote system when REPOSITORY is remote.
- --from PATH¶
Use PATH as the diff baseline for the /ckout page
- --localauth¶
Enable automatic login for requests from localhost
- --https¶
Indicates that the input is coming through a reverse proxy that has already translated HTTPS into HTTP.
- --jsmode MODE¶
Determine how JavaScript is delivered with pages. Mode can be one of:
inline All JavaScript is inserted inline at the end of the HTML file. separate Separate HTTP requests are made for each JavaScript file. bundled One single separate HTTP fetches all JavaScript concatenated together.Depending on the needs of any given page, inline and bundled modes might result in a single amalgamated script or several, but both approaches result in fewer HTTP requests than the separate mode.
Override the mainmenu config setting with the contents of the given file
- --max-latency N¶
Do not let any single HTTP request run for more than N seconds (only works on unix)
- --nocompress¶
Do not compress HTTP replies
- --nojail¶
Drop root privileges but do not enter the chroot jail
- --nossl¶
Do not force redirects to SSL even if the repository setting redirect-to-https requests it. This is set by default for the ui command.
- --notfound URL¶
Redirect to URL if a page is not found.
- --pkey FILE¶
Read the private key used for TLS from FILE
- -P, --port [IP:]PORT¶
Listen on the given IP (optional) and port
- --repolist¶
If REPOSITORY is dir, URL
/lists repos
- --scgi¶
Accept SCGI rather than HTTP
- --skin LABEL¶
Use override skin LABEL, or the site’s default skin if LABEL is an empty string.
- --socket-mode MODE¶
File permissions to set for the unix socket created by the
--socket-nameoption.
- --socket-name NAME¶
Use a unix-domain socket called NAME instead of a TCP/IP socket.
- --socket-owner USR¶
Try to set the owner of the unix socket to USR. USR can be of the form USER:GROUP to set both user and group.
- --th-trace¶
Trace TH1 execution (for debugging purposes)
- --usepidkey¶
Use saved encryption key from parent process. This is only necessary when using SEE on Windows or Linux.