equal
deleted
inserted
replaced
2 |
2 |
3 <VirtualHost *:80> |
3 <VirtualHost *:80> |
4 |
4 |
5 ServerAdmin webmaster@localhost |
5 ServerAdmin webmaster@localhost |
6 ServerName {{ cookiecutter.virtual_hostname }} |
6 ServerName {{ cookiecutter.virtual_hostname }} |
|
7 |
|
8 {%- if cookiecutter.use_https.lower() in ('true','on','yes','1') %} |
|
9 |
|
10 RewriteEngine on |
|
11 RewriteRule (.*) https://{{ cookiecutter.virtual_hostname}}$1 |
|
12 |
|
13 </VirtualHost> |
|
14 |
|
15 <VirtualHost *:443> |
|
16 |
|
17 ServerAdmin webmaster@localhost |
|
18 ServerName {{ cookiecutter.virtual_hostname }} |
|
19 {%- endif %} |
7 |
20 |
8 DocumentRoot $((INSTALL))/var/htdocs |
21 DocumentRoot $((INSTALL))/var/htdocs |
9 ErrorLog {{ cookiecutter.logs_directory }}/{{ cookiecutter.project_slug }}-error.log |
22 ErrorLog {{ cookiecutter.logs_directory }}/{{ cookiecutter.project_slug }}-error.log |
10 |
23 |
11 LogLevel warn |
24 LogLevel warn |
26 <Directory $((INSTALL))/parts/wsgi> |
39 <Directory $((INSTALL))/parts/wsgi> |
27 Order deny, allow |
40 Order deny, allow |
28 Allow from all |
41 Allow from all |
29 </Directory> |
42 </Directory> |
30 |
43 |
|
44 {%- if cookiecutter.use_notifications.lower() in ('true','on','yes','1') %} |
|
45 |
|
46 RewriteEngine on |
|
47 |
|
48 RewriteCond %{HTTP:Upgrade} =websocket [NC] |
|
49 RewriteRule /(.*) ws://{{ cookiecutter.pyams_ws_notify }}/$1 [P,L] |
|
50 {%- endif %} |
|
51 |
|
52 {%- if cookiecutter.use_https.lower() in ('true','on','yes','1') %} |
|
53 |
|
54 SSLEngine on |
|
55 {%- if cookiecutter.use_notifications.lower() in ('true','on','yes','1') %} |
|
56 SSLProxyEngine on |
|
57 {%- endif %} |
|
58 |
|
59 SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem |
|
60 SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key |
|
61 {%- endif %} |
|
62 |
31 </VirtualHost> |
63 </VirtualHost> |