/
test.conf
33 lines (28 loc) · 1.4 KB
/
test.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
<VirtualHost *>
ServerAdmin sys@{{ domain }}
ServerName {{ client }}-{{ project_code }}-test.{{ domain }}
DocumentRoot /var/www/nginx-default
WSGIDaemonProcess {{ client }}-{{ project_code }}-test processes=2 threads=5 display-name={{ client }}-{{ project_code }}-test maximum-requests=10000
WSGIProcessGroup {{ client }}-{{ project_code }}-test
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /var/www/{{ client }}/{{ project_code }}/builds/test/deploy/wsgi/test.wsgi
WSGIPassAuthorization On
<Directory /var/www/{{ client }}/{{ project_code }}/builds/test/deploy/wsgi>
Order deny,allow
Allow from all
</Directory>
# Custom format to log request time
# - %T is time to serve the request in SECONDS
# - %D is time to serve the request in MICROSECONDS
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
CustomLog /var/log/apache2/access.{{ client }}-{{ project_code }}-test.{{ domain }}.log timed
ErrorLog /var/log/apache2/error.{{ client }}-{{ project_code }}-test.{{ domain }}.log
# This will need removing when we go live.
<Location />
AuthType Basic
AuthName "Authentication required"
AuthGroupFile /dev/null
AuthUserFile /var/www/{{ client }}/{{ project_code }}/builds/test/deploy/apache2/users
Require valid-user
</Location>
</Virtualhost>