# requires debian/ubuntu: libaprutil1-dbd-mysql libapache2-mod-fcgid
# run:
# a2enmod dbd
# a2enmod authn_dbd
# a2enmod authn_socache
# a2enmod fcgid

DBDriver mysql
DBDParams "host=localhost dbname=autodoc user=autodoc pass=autodoc"
DBDMin 4
DBDKeep 8
DBDMax 20
DBDExptime 300

<Directory "/opt/autodoc">
	AuthType Basic
	AuthName "AutoDoc Authentication"
	AuthBasicProvider socache dbd
	AuthnCacheProvideFor dbd
	AuthnCacheContext autodoc
	Require valid-user
	AuthDBDUserPWQuery "SELECT passwd FROM users WHERE username = %s"
</Directory>

DocumentRoot "/opt/autodoc/www"
ScriptAliasMatch /v1/.* /opt/autodoc/cgi/autodoc.fcgi
