[BACK]Return to httpd.conf CVS log [TXT][DIR] Up to [local] / www

File: [local] / www / httpd.conf (download)

Revision 1.1, Thu May 12 13:48:55 2016 UTC (8 years ago) by beck
Branch: MAIN

Add a suggested httpd.conf configuration for mirrors, to
encourage not screwing up mime types and other things

# $OpenBSD: httpd.conf,v 1.1 2016/05/12 13:48:55 beck Exp $

# A configuration suitable for being an OpenBSD www/sets mirror. 
# 
# This assumes you have checked out the www repository under 
# /var/www/htdocs/www and that you have a mirror of the OpenBSD
# distribition space mounted under /var/www/pub/OpenBSD, and
# you are running OpenBSD httpd with it chrooting to the default
# /var/www location.
#

prefork 20

# Necessary so patches and other files don't show up as binaries
default type text/plain

# A name-based "virtual" server on the same address
server "default" {
	listen on * port 80

	# Optional, but probably best - change your syslog.conf to do 
	# what you want with it then.
	log syslog

	# Serve up ftp space mounted in /var/www/pub.
	# Comment this out if you are not mirroring the distribution sets 
	location "/pub/*" {
		directory auto index
		log style combined
		root "/"
	}
	# Send man.cgi requests to man.openbsd.org
        location "/cgi-bin/man.cgi*" {
                block return 301 "http://man.openbsd.org$REQUEST_URI"
        }
	# Send cvsweb requests to cvsweb.openbsd.org
        location "/cgi-bin/cvsweb*" {
                block return 301 "http://cvsweb.openbsd.org$REQUEST_URI"
	}
	directory auto index
	root "/htdocs/www"
}

# Include MIME types instead of the built-in ones
types {
        include "/usr/share/misc/mime.types"
	# Necessary to ensure patch files show up as text not binary
        text/plain sig
}