This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.conf
99 lines (80 loc) · 2.71 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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
user www-data;
worker_processes 4;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_comp_level 2;
gzip_min_length 1100;
gzip_proxied any;
gzip_buffers 4 8k;
client_max_body_size 32m;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/json;
server {
listen 443 default_server;
server_name dummy;
ssl on;
ssl_certificate /etc/nginx/cert/cloudflare-info-beamer.org.pem;
ssl_certificate_key /etc/nginx/cert/cloudflare-info-beamer.org.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
location / {
return 404 'Nothing to see here.';
}
}
server {
listen 443;
server_name 36c3.info-beamer.org;
ssl on;
ssl_certificate /etc/nginx/cert/cloudflare-info-beamer.org.pem;
ssl_certificate_key /etc/nginx/cert/cloudflare-info-beamer.org.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
location @502 {
add_header Content-Type text/html;
add_header Cache-Control no-cache;
return 200 'Try again later.';
}
error_page 502 =200 @502;
location /twitter/ {
alias /export/twitter/;
}
location /static/ {
alias /service/cms/static/;
}
location /static/favicon.ico {
alias /service/cms/static/favicon.ico;
add_header Cache-Control "public,max-age=31536000,immutable";
}
location ~ /static/(.*)$ {
alias /service/cms/static/$1;
add_header Cache-Control "public,max-age=31536000,immutable";
}
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
}
}
}