User manual

22: Configuring HTTP server
_______________________________________________________________________________________________________
22 Configuring HTTP server
The uhttpd configuration is used by the uhttpd web server package. This file
defines the behaviour of the server and default values for certificates generated
for SSL operation. uhttpd supports multiple instances, that is, multiple listen
ports, each with its own document root and other features, as well as cgi, and
lua.
There are two sections defined, the section of type uhttpd contains general
server settings while the cert section defines the default values for SSL
certificates.
22.1 Server settings
The options defined for this section are outlined below.
Name Type Required Default Description
listen_http
list of port
numbers or
address:port
pairs
yes (none)
Specifies the ports and addresses
to listen on for plain HTTP access.
If only a port number is given, the
server will attempt to serve both
IPv4 and IPv6 requests. Use
0.0.0.0.:80 to bind at port 80 only
on IPv4 interfaces or [::] : 80 to
serve only IPv6.
listen_https
list of port
numbers or
address:port
pairs
no (none)
Specifies the ports and addresses
to listen on for encrypted HTTPS
access. The format is the same as
for listen_http. Read below for
extra details.
Home
directory
path
yes /www Defines the server document root.
Cert file path
yes if
listen_
https is
given,
else no
/etc/
uhttpd.crt
ASN.1/DER certificate used to
serve HTTPS connections
key file path
yes if
listen_
https is
given,
else no
/etc/
uhttpd.key
ASN.1/DER private key used to
serve HTTPS connections.
cgi_prefix string no /cgi-bin
Defines the prefix for CGI scripts,
relative to the document root. CGI
support is disabled if this option is
missing.
lua_prefix string no (none)
Defines the prefix for dispatching
requests to the embedded Lua
interpreter, relative to the
_______________________________________________________________________________________________________
© Virtual Access 2015
GW1000 Series User Manual
Issue: 2.4 Page 148 of 255