#==============================================================================
# Sample Apache server configuration section for Pangloss
#==============================================================================

# do your normal apache config first, don't forget to load mod_perl.c

# use name-based virutal hosting
<VirtualHost *>
	ServerName	pangloss.example.com
	ServerAdmin	root@example.com

	DocumentRoot	/usr/local/pangloss/web
	CustomLog	/usr/local/pangloss/logs/apache.log
	ErrorLog	/usr/local/pangloss/logs/apache_error.log

	# Install Pangloss at root context
	<Location />
		SetHandler	perl-script
		PerlHandler	Pangloss::Apache::Handler

		# see Pangloss::Config for details on these:
		PerlSetEnv	PERL5LIB      "/usr/local/pangloss/lib"
		PerlSetEnv	PG_HOME       "/usr/local/pangloss"
    		PerlSetEnv	PG_PIXIE_DSN  "dbi:mysql:dbname=pangloss"
    		PerlSetEnv	PG_PIXIE_USER "test"
    		PerlSetEnv	PG_DEBUG      1

		# to pre-load modules, set PERL5LIB before starting apache:
		#PerlModule Petal
		#PerlModule Pangloss

		# do some basic auth so users can log in:
		AuthType	Basic
		AuthName	"Pangloss Example Server"
		AuthUserFile	/usr/local/pangloss/auth.db
		Require		valid-user

		# access permissions:
		Options		-All -MultiViews
		AllowOverride	None
		Order		allow,deny
		Allow		from all
	</Location>

	# let Apache serve static files
	<Location /pcie.css>
		SetHandler	default-handler
	</Location>

	<Location /gfx/>
		SetHandler	default-handler
	</Location>
</VirtualHost>

