summaryrefslogtreecommitdiff
path: root/roles/sublab_web/templates/server.conf.j2
blob: a1888d1fd84926e446f092940e2e53cdef8b7606 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
ServerAdmin nobody-wolpertinger@nowhere.ws
ServerName {{ sublab_web_server_name }}
ServerAlias www.{{ sublab_web_server_name }}

DocumentRoot /var/www/{{ sublab_web_server_name }}/htdocs/public

<Directory /var/www/{{ sublab_web_server_name }}/htdocs/public>
  AllowOverride None
  Require all granted
</Directory>

RewriteEngine On

RewriteRule ^/lounge/?$ /sublounge [R=302]
RewriteRule ^/phantomspeisung/?$ /vokue [R=301]
RewriteRule ^/vokue/?$ /wiki/Phantomspeisung/ [R=301]

RewriteRule ^/cryptocon14(/?|.*)$ https://cryptocon.org/14$1 [R=301,last]
RewriteRule ^/cryptocon15(/?|.*)$ https://cryptocon.org/15$1 [R=301,last]
RewriteRule ^/dump(/?|.*)$ http://dump.sublab.org$1 [R=301,last]

# Allow the drop of .html
RewriteRule ^/([^/\.]+)$ /$1.html

# RewriteLog /tmp/rewrite-log
# RewriteLogLevel 9

ErrorDocument 401 /401.html
ErrorDocument 404 /404.html

<Location /server-status>
    SetHandler server-status
    Require ip 127.0.0.1
</Location>
<Location /server-info>
    SetHandler server-info
    Require ip 127.0.0.1
</Location>
Redirect 301 /sublab_status.json /status.json
<Location /sublab_status.json>
    Header set Access-Control-Allow-Origin *
    Header set Cache-Control no-cache
</Location>
<Location /status.json>
    Header set Access-Control-Allow-Origin *
    Header set Cache-Control no-cache
</Location>
<Location /css/nautilus.status.css>
    Header set Cache-Control no-cache
</Location>
<Location /css/sublab.status.css>
    Header set Cache-Control no-cache
</Location>
<Location /css/trieste.status.css>
    Header set Cache-Control no-cache
</Location>
<Location /css/taifun.status.css>
    Header set Cache-Control no-cache
</Location>
<Location /api/status>
    Header set Cache-Control no-cache
</Location>
<Location /img/thumb.tempgraph.png>
    Header set Cache-Control no-cache
</Location>
<Location /img/thumb.street.webcam.jpg>
    Header set Cache-Control no-cache
</Location>
<Location /img/street.webcam.jpg>
    Header set Cache-Control no-cache
</Location>
<Location /img/tempgraph.png>
    Header set Cache-Control no-cache
</Location>