-
Notifications
You must be signed in to change notification settings - Fork 16
/
nginx.conf
44 lines (35 loc) · 1.13 KB
/
nginx.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
34
35
36
37
38
39
40
41
42
43
events {}
http {
include /etc/nginx/mime.types;
# Map hostname and path to favicon file
map $http_referer $favicon_file {
default /usr/share/nginx/html/favicon.ico;
"~*tum-global-week\.esn\.world" /usr/share/nginx/html/favicon-tum.ico;
}
# Map hostname and path to page title
map $http_referer $page_title {
default "ESN App";
"~*tumi\.esn\.world" "ESN TUMi events";
"~*mannheim\.esn\.world" "ESN VISUM Mannheim events";
"~*tum-global-week\.esn\.world" "TUM Global Week";
}
server {
listen 4000;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
# Set page title using sub_filter
sub_filter '<title>ESN App</title>' "<title>$page_title</title>";
sub_filter_once on;
}
# Serve favicon file
location ~* ^/.*favicon\.ico {
add_header Cache-Control "public, max-age=31536000";
access_log off;
expires 365d;
alias $favicon_file;
}
}
}