-
Notifications
You must be signed in to change notification settings - Fork 0
/
sevhlidka.conf
71 lines (57 loc) · 1.69 KB
/
sevhlidka.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
# vim: ft=sh
upstream sevhlidka {
server unix:/srv/sevhlidka/run/socket fail_timeout=5;
server unix:/srv/sevhlidka/run/socket fail_timeout=5;
}
server {
listen 0:80;
listen [::]:80;
listen 0:443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/letsencrypt/live/is.sevhlidka.cz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/is.sevhlidka.cz/privkey.pem;
server_name is.sevhlidka.cz;
location /.well-known {
root /srv/letsencrypt/htdocs;
}
location ~* \.php(/|$) {
return 404;
}
location /static {
access_log off;
expires 30d;
root /srv/sevhlidka;
}
location /media {
access_log off;
expires 30d;
root /srv/sevhlidka;
}
location /__startup__.html {
internal;
root /srv/sevhlidka;
}
error_page 500 502 503 504 /__startup__.html;
location /admin/ {
client_max_body_size 4G;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://sevhlidka;
}
location / {
client_max_body_size 512m;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://sevhlidka;
}
# redirections
if ($scheme = http) {
rewrite ^/(.*)$ https://is.sevhlidka.cz/$1 permanent;
}
access_log /var/log/nginx/sevhlidka.access.log;
error_log /var/log/nginx/sevhlidka.error.log;
}