Skip to content

Commit

Permalink
added generic ssl apache config
Browse files Browse the repository at this point in the history
  • Loading branch information
dlareau committed Jan 12, 2020
1 parent 381b667 commit 9943651
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions config/puzzlehunt_generic_ssl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# An apache configuration file meant to be paired with puzzlehunt_setup.sh
# Meant for quick developement. Does not do shibboleth or ssl.

Define basepath replacepath
Define hostname replacename

NameVirtualHost *:80
<VirtualHost *:80>
ServerName ${hostname}

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
Redirect permanent / https://${hostname}/
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName ${hostname}

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

<Directory ${basepath}/puzzlehunt_server>
<Files wsgi.py>
Require all granted
</Files>
</Directory>

Alias /static ${basepath}/static
<Directory ${basepath}/static>
Require all granted
</Directory>

Alias /media ${basepath}/media
XSendFile On
XSendFilePath ${basepath}/media
<Directory ${basepath}/media>
Require all granted
</Directory>
<Directory ${basepath}/media/puzzles>
Require all denied
</Directory>

ProxyPass /static/ !
ProxyPass /media/ !

WSGIDaemonProcess puzzlehunt_server python-path=${basepath}:${basepath}/venv/lib/python3.5/site-packages
WSGIProcessGroup puzzlehunt_server
WSGIScriptAlias / ${basepath}/puzzlehunt_server/wsgi.py

</VirtualHost>

</IfModule>

0 comments on commit 9943651

Please sign in to comment.