blob: c1f414a32d505a06fcde1e70c3f783bd1c4025e0 [file] [log] [blame]
# Sample httpd configuration for Steve's Python REST API test
# see http://stv.website/steve/voter/view/foo for an example.
<VirtualHost *:80>
DocumentRoot /var/www/steve/www/htdocs
ServerName stv.website
DirectoryIndex index.html
<Directory /var/www/steve/www/cgi-bin/>
Require all granted
Options +ExecCGI
AddHandler cgi-script .py
</Directory>
# REST API
ScriptAlias /steve/admin /var/www/steve/www/cgi-bin/rest_admin.py
ScriptAlias /steve/voter /var/www/steve/www/cgi-bin/rest_voter.py
# HTML generators
ScriptAlias /steve/ballot /var/www/steve/www/cgi-bin/html_ballot.py
ScriptAlias /steve/election /var/www/steve/www/cgi-bin/html_election.py
<Location /steve/admin>
AuthType Basic
AuthName "STeVe administration"
# CHANGE THIS TO YOUR REAL ACCESS FILE/SCHEME
AuthBasicProvider file
AuthUserFile /var/www/steve/htpasswd-example
Require valid-user
</Location>
</VirtualHost>