Markus Hennecke 02d2b73a22 Add nginx/slowcgi configuration instructions 5 years ago
..
README.httpd.md 8969599c75 Add location handler for / in example httpd.conf 6 years ago
README.nginx.md 02d2b73a22 Add nginx/slowcgi configuration instructions 5 years ago
README.tmpl.md 4ed91ea78e We won't support a template root path for now 6 years ago

README.httpd.md

OpenBSD httpd configuration notes

Example configuration for httpd

Include the directories /var/www/htdocs/{images,css} to be served by httpd, setup location /cgi-bin/ to pass requests to slowcgi and request a rewrite for /*.html style URLs:

server "example.com" {
	listen on * port 80
	root "/htdocs"
	location "/css/*" {
		pass
	}
	location "/downloads/*" {
		pass
	}
	location "/images/*" {
		pass
	}
	location "/sitemap.xml.gz" {
		request rewrite "/cgi-bin/sitemap/sitemap.xml.gz"
	}
	location "/sitemap.xml" {
		request rewrite "/cgi-bin/sitemap/sitemap.xml"
	}
	location "/cgi-bin/*" {
		fastcgi
		root "/"
	}
	location "/*.html" {
		request rewrite "/cgi-bin/cms$REQUEST_URI"
	}
	location "/" {
		request rewrite "/cgi-bin/cms"
	}
}


chroot for httpd

Remember to set the CHROOT variable to /var/www if using httpd(8) and slowcgi(8).