This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hinzu_project
66 lines (47 loc) · 1.6 KB
/
hinzu_project
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
server {
server_name hinzu.online hinzu.ru;
client_max_body_size 64m;
################
# for reactApp #
################
root /home/ivan/Hinzu/react-hinzu-app/build;
index index.html index.htm;
location / {
try_files $uri /index.html =404;
}
location /hinzu-django/ {
include proxy_params;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_headers_hash_max_size 512;
proxy_headers_hash_bucket_size 128;
proxy_pass http://127.0.0.1:8000; #http://unix:/home/ivan/Hinzu/backend/hinzu_project.sock;
}
location /admin {
proxy_pass http://127.0.0.1:8000/admin;
}
location /staticfiles/ {
alias /home/ivan/Hinzu/django-app/staticfiles/;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/hinzu.online/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/hinzu.online/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = hinzu.online) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name hinzu.online;
return 404; # managed by Certbot
}
server {
if ($host = hinzu.ru) {
return 301 https://$host$request_uri;
} # managed by Certbot & Academy
listen 80;
server_name hinzu.ru;
return 404; # managed by Certbot & Academy
}