generated from yandex-praktikum/client-server-template-with-vite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
53 lines (40 loc) · 1.91 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
events {}
http {
include mime.types;
server {
listen 80;
server_name chapecker.ya-praktikum.tech;
ssi on;
return 301 https://chapecker.ya-praktikum.tech$request_uri;
}
server {
listen 443 http2 ssl backlog=2048 ipv6only=off;
server_name chapecker.ya-praktikum.tech;
add_header Strict-Transport-Security "max-age=31536000;";
add_header Content-Security-Policy "default-src 'self'; style-src-elem 'self' fonts.googleapis.com 'unsafe-inline'; font-src 'self' fonts.gstatic.com;";
location /api/ {
# All queries are proxied to port 3001
proxy_pass http://localhost:3001/api/;
proxy_set_header Cache-Control no-cache;
add_header X-port '3001';
# Other
client_max_body_size 128m;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age = 0';
if_modified_since off;
expires off;
etag off;
}
root /home/chadmin/chapecker/packages/client/dist;
location /assets {
try_files $uri /;
}
location / {
try_files $uri /index.html;
index /index.html;
}
# SSL & HTTPS
ssi on;
ssl_certificate /etc/letsencrypt/live/chapecker.ya-praktikum.tech/fullchain.pem; # Путь до сертификата
ssl_certificate_key /etc/letsencrypt/live/chapecker.ya-praktikum.tech/privkey.pem; # Путь до ключа
}
}