diff options
Diffstat (limited to 'httpd/httpd.conf.5')
-rw-r--r-- | httpd/httpd.conf.5 | 89 |
1 files changed, 66 insertions, 23 deletions
diff --git a/httpd/httpd.conf.5 b/httpd/httpd.conf.5 index 26d6798..b3eaad8 100644 --- a/httpd/httpd.conf.5 +++ b/httpd/httpd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: httpd.conf.5,v 1.57 2015/03/26 19:16:57 jmc Exp $ +.\" $OpenBSD: httpd.conf.5,v 1.64 2015/07/15 17:10:47 jsing Exp $ .\" .\" Copyright (c) 2014, 2015 Reyk Floeter <reyk@openbsd.org> .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 26 2015 $ +.Dd $Mdocdate: July 15 2015 $ .Dt HTTPD.CONF 5 .Os .Sh NAME @@ -131,14 +131,38 @@ The configured web servers. .Pp Each .Ic server -must have a -.Ar name -and include one or more lines of the following syntax: +section starts with a declaration of the server +.Ar name : +.Bl -tag -width Ds +.It Ic server Ar name Brq ... +Match the server name using shell globbing rules. +This can be an explicit name, +.Ar www.example.com , +or a name including wildcards, +.Ar *.example.com . +.It Ic server match Ar name Brq ... +Match the server name using pattern matching, +see +.Xr patterns 7 . +.El +.Pp +Followed by a block of options that is enclosed in curly brackets: .Bl -tag -width Ds .It Ic alias Ar name Specify an additional alias .Ar name for this server. +.It Ic alias match Ar name +Like the +.Ic alias +option, +but +.Ic match +the +.Ar name +using pattern matching instead of shell globbing rules, +see +.Xr patterns 7 . .It Oo Ic no Oc Ic authenticate Oo Ar realm Oc Ic with Pa htpasswd Authenticate a remote user for .Ar realm @@ -152,7 +176,7 @@ Use the directive to disable authentication in a location. .It Ic block drop Drop the connection without sending an error page. -.It Ic block Op Ic return Ar code Op uri +.It Ic block Op Ic return Ar code Op Ar uri Close the connection and send an error page. If the optional return code is not specified, .Xr httpd 8 @@ -166,7 +190,7 @@ argument can be used with return codes in the 3xx range to send a header for redirection to a specified URI. .Pp The -.Ar url +.Ar uri may contain predefined macros that will be expanded at runtime: .Pp .Bl -tag -width $DOCUMENT_URI -offset indent -compact @@ -188,6 +212,12 @@ The configured IP address of the server. The configured TCP server port of the server. .It Ic $SERVER_NAME The name of the server. +.It Pf % Ar n +The capture index +.Ar n +of a string that was captured by the enclosing +.Ic location match +option. .El .It Ic connection Ar option Set the specified options and limits for HTTP connections. @@ -247,6 +277,22 @@ except .Ic location and .Ic tcp . +.It Ic location match Ar path Brq ... +Like the +.Ic location +option, +but +.Ic match +the +.Ar path +using pattern matching instead of shell globbing rules, +see +.Xr patterns 7 . +The pattern may contain captures that can be used in the +.Ar uri +of an enclosed +.Ic block return +option. .It Oo Ic no Oc Ic log Op Ar option Set the specified logging options. Logging is enabled by default using the standard @@ -366,6 +412,8 @@ Specify the certificate to use for this server. The .Ar file should contain a PEM encoded certificate. +The default is +.Pa /etc/ssl/server.crt . .It Ic ciphers Ar string Specify the TLS cipher string. If not specified, the default value @@ -392,6 +440,8 @@ should contain a PEM encoded private key and reside outside of the .Xr chroot 2 root directory of .Nm httpd . +The default is +.Pa /etc/ssl/private/server.key . .It Ic protocols Ar string Specify the TLS protocols to enable for this server. If not specified, the value @@ -451,14 +501,14 @@ server "default" { } types { - text/css css - text/html htm html - text/txt txt - image/gif gif - image/jpeg jpg jpeg - image/png png - application/javascript js - application/xml xml + text/css css + text/html html htm + text/txt txt + image/gif gif + image/jpeg jpeg jpg + image/png png + application/javascript js + application/xml xml } .Ed .Pp @@ -514,16 +564,9 @@ server "www.example.com" { listen on 10.0.0.1 port 80 } .Ed -.Pp -The syntax of the types section is also compatible with the format -used by nginx, so it is possible to include its -.Pa mime.types -file directly: -.Bd -literal -offset indent -include "/etc/nginx/mime.types" -.Ed .Sh SEE ALSO .Xr htpasswd 1 , +.Xr patterns 7 , .Xr httpd 8 , .Xr slowcgi 8 .Sh AUTHORS |