From bf736b1f7be22ff8510a1f83f28396abe39e3473 Mon Sep 17 00:00:00 2001 From: reyk Date: Sun, 3 Aug 2014 11:28:58 +0000 Subject: [PATCH] More examples, include FastCGI for php and cgi-bin and logging. --- etc/examples/httpd.conf | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/etc/examples/httpd.conf b/etc/examples/httpd.conf index 9c9513981f7..ea70315ffa0 100644 --- a/etc/examples/httpd.conf +++ b/etc/examples/httpd.conf @@ -1,4 +1,4 @@ -# $OpenBSD: httpd.conf,v 1.4 2014/07/30 10:05:14 reyk Exp $ +# $OpenBSD: httpd.conf,v 1.5 2014/08/03 11:28:58 reyk Exp $ # Macros ext_addr="egress" @@ -9,8 +9,24 @@ ext_addr="egress" # Servers server "default" { listen on $ext_addr port 80 + + # Logging is enabled by default, but it can be turned off per server + #no log + location "/pub/*" { directory auto index + log combined + } + + location "*.php" { + fastcgi socket "/run/php-fpm.sock" + } + + location "/cgi-bin/*" { + fastcgi + + # The /cgi-bin directory is outside of the document root + root "/" } } -- 2.20.1