~launchpad-pqm/launchpad/devel

11128.10.2 by Michael Hudson
merge more separate apache config from later pipe
1
NameVirtualHost 127.0.0.77:80
2
3
RewriteLock /var/tmp/vostok-rewrite-lock
4
5
<VirtualHost 127.0.0.77:80>
6
  ServerName archive.vostok.dev
7
  LogLevel debug
8
9
  DocumentRoot /var/tmp/vostok-archive
10
  <Directory /var/tmp/vostok-archive/>
11
    Order Deny,Allow
12
    Deny from all
13
    Allow from 127.0.0.0/255.0.0.0
14
    Options Indexes
15
  </Directory>
16
</VirtualHost>
17
18
<VirtualHost 127.0.0.77:443>
19
  ServerName vostok.dev
20
  ServerAlias *.vostok.dev
21
  <Proxy *>
22
    Order deny,allow
23
    Allow from 127.0.0.0/255.0.0.0
24
  </Proxy>
25
  SSLEngine On
26
  SSLCertificateFile /etc/apache2/ssl/launchpad.crt
27
  SSLCertificateKeyFile /etc/apache2/ssl/launchpad.key
28
29
  ProxyPreserveHost on
30
  ProxyPass / http://localhost:8086/ retry=1
31
32
  <Location />
33
    # Insert filter
34
    SetOutputFilter DEFLATE
35
36
    # Don't compress images
37
    SetEnvIfNoCase Request_URI \
38
    \.(?:gif|jpe?g|png)$ no-gzip dont-vary
39
40
    # Don't gzip anything that starts /@@/ and doesn't end .js (ie images)
41
    SetEnvIfNoCase Request_URI ^/@@/ no-gzip dont-vary
42
    SetEnvIfNoCase Request_URI ^/@@/.*\.js$ !no-gzip !dont-vary
43
  </Location>
44
45
</VirtualHost>
46
47
<VirtualHost 127.0.0.77:80>
48
  ServerName vostok.dev
49
  ServerAlias *.vostok.dev
50
  RewriteEngine On
51
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
52
</VirtualHost>