forked from HackSpaceClt/CCVote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apache-vhost-config.conf
51 lines (40 loc) · 1.96 KB
/
apache-vhost-config.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# The bulk of this config was gleaned from reading
# https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ and
# http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
# Also needed to add "WSGISocketPrefix run/wsgi" to /etc/httpd/conf.d/wsgi.conf
# Worst part of this is the admin static alias. If versions change (and
# consequently paths), it'll break. The djangoproject.com doc referenced
# above mentioned using django.contrib.staticfiles, but I fear the 'collection'
# process on those files...
# Assuming project lives in /srv/www/ccvote
<VirtualHost *:80>
ServerName voteserver.hsc.myproit.com
# ServerAlias votingsystem.hackerspacecharlotte.org
# Nothing's ever really served direct from here, so this could very well be
# an empty directory or something of the sort
DocumentRoot /srv/www/ccvote/CCVote/ccvote/main
Alias /robots.txt /srv/www/ccvote/CCVote/ccvote/main/static/robots.txt
Alias /favicon.ico /srv/www/ccvote/CCVote/ccvote/main/static/favicon.ico
# horrible admin static alias
Alias /static/admin/ /usr/lib/python2.6/site-packages/Django-1.4.1-py2.6.egg/django/contrib/admin/static/admin/
<Directory /usr/lib/python2.6/site-packages/Django-1.4.1-py2.6.egg/django/contrib/admin/static/admin>
Order deny,allow
Allow from all
</Directory>
Alias /static/ /srv/www/ccvote/CCVote/ccvote/main/static/
<Directory /srv/www/ccvote/CCVote/ccvote/main/static>
Order deny,allow
Allow from all
</Directory>
WSGIDaemonProcess voteserver python-path=/srv/www/ccvote/CCVote/ccvote processes=2 threads=15 display-name=%{GROUP}
WSGIProcessGroup voteserver
WSGIScriptAlias / /srv/www/ccvote/CCVote/ccvote/ccvote/wsgi.py
<Directory /srv/www/ccvote/CCVote/ccvote/ccvote>
<Files wsgi.py>
Order allow,deny
Allow from all
</Files>
</Directory>
ErrorLog logs/vote_gold-error_log
CustomLog logs/vote_gold-access_log common
</VirtualHost>