-# $OpenBSD: httpd.conf,v 1.9 2014/08/05 18:01:10 reyk Exp $
+# $OpenBSD: httpd.conf,v 1.10 2014/08/06 20:29:54 reyk Exp $
#
# Macros
# An HTTPS server using SSL/TLS
server "secure.example.com" {
- listen on 127.0.0.1 port 443 ssl
+ listen on 127.0.0.1 ssl port 443
# Define server-specific log files relative to /logs
log { access "secure-access.log", error "secure-error.log" }
-.\" $OpenBSD: httpd.conf.5,v 1.28 2014/08/06 18:21:14 reyk Exp $
+.\" $OpenBSD: httpd.conf.5,v 1.29 2014/08/06 20:29:54 reyk Exp $
.\"
.\" Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
.\"
.Nm httpd
and defaults to
.Pa /run/slowcgi.sock .
-.It Ic listen on Ar address Ic port Ar number Op Ic ssl
+.It Ic listen on Ar address Oo Ic ssl Oc Ic port Ar number
Set the listen address and port.
.It Ic location Ar path { ... }
Specify server configuration rules for a specific location.
-/* $OpenBSD: parse.y,v 1.33 2014/08/06 18:21:14 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.34 2014/08/06 20:29:54 reyk Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
| serveroptsl optnl
;
-serveroptsl : LISTEN ON STRING port optssl {
+serveroptsl : LISTEN ON STRING optssl port {
struct addresslist al;
struct address *h;
struct server *s;
YYERROR;
} else
s = srv;
- if ($4.op != PF_OP_EQ) {
+ if ($5.op != PF_OP_EQ) {
yyerror("invalid port");
free($3);
YYERROR;
}
TAILQ_INIT(&al);
- if (host($3, &al, 1, &$4, NULL, -1) <= 0) {
+ if (host($3, &al, 1, &$5, NULL, -1) <= 0) {
yyerror("invalid listen ip: %s", $3);
free($3);
YYERROR;
s->srv_conf.prefixlen = h->prefixlen;
host_free(&al);
- if ($5) {
+ if ($4) {
s->srv_conf.flags |= SRVFLAG_SSL;
}
}