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 |
24 |
37 |
25 <Directory $((INSTALL))/parts/wsgi> |
38 <Directory $((INSTALL))/parts/wsgi> |
26 Require all granted |
39 Require all granted |
27 </Directory> |
40 </Directory> |
28 |
41 |
|
42 {%- if cookiecutter.use_notifications.lower() in ('true','on','yes','1') %} |
|
43 |
|
44 RewriteEngine on |
|
45 |
|
46 RewriteCond %{HTTP:Upgrade} =websocket [NC] |
|
47 RewriteRule /(.*) ws://{{ cookiecutter.pyams_ws_notify }}/$1 [P,L] |
|
48 {%- endif %} |
|
49 |
|
50 {%- if cookiecutter.use_https.lower() in ('true','on','yes','1') %} |
|
51 |
|
52 SSLEngine on |
|
53 {%- if cookiecutter.use_notifications.lower() in ('true','on','yes','1') %} |
|
54 SSLProxyEngine on |
|
55 {%- endif %} |
|
56 |
|
57 SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem |
|
58 SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key |
|
59 {%- endif %} |
|
60 |
29 </VirtualHost> |
61 </VirtualHost> |