More examples, include FastCGI for php and cgi-bin and logging.
authorreyk <reyk@openbsd.org>
Sun, 3 Aug 2014 11:28:58 +0000 (11:28 +0000)
committerreyk <reyk@openbsd.org>
Sun, 3 Aug 2014 11:28:58 +0000 (11:28 +0000)
etc/examples/httpd.conf

index 9c95139..ea70315 100644 (file)
@@ -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 "/"
        }
 }