-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.movie-gate.online.conf.txt
132 lines (114 loc) · 3.49 KB
/
nginx.movie-gate.online.conf.txt
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
server {
listen 80;
listen [::]:80;
server_name db.movie-gate.ru www.db.movie-gate.ru;
location / {
proxy_pass http://127.0.0.1:5432;
}
}
server {
listen 80;
listen [::]:80;
server_name admindb.movie-gate.ru www.admindb.movie-gate.ru;
location / {
proxy_pass http://127.0.0.1:5050;
}
}
server {
listen 80;
listen [::]:80;
server_name prometheus.movie-gate.ru www.prometheus.movie-gate.ru;
location / {
proxy_pass http://127.0.0.1:9090;
}
}
upstream grafana {
server 127.0.0.1:3000;
}
server {
listen 80;
listen [::]:80;
server_name www.monitoring.movie-gate.ru;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
proxy_set_header Host $http_host;
proxy_pass http://grafana;
}
# Proxy Grafana Live WebSocket connections.
location /api/live/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
proxy_pass http://grafana;
}
location /database/ {
proxy_pass http://127.0.0.1:5432;
}
}
server {
listen 80;
listen [::]:80;
server_name movie-gate.ru www.movie-gate.ru;
return 301 https://movie-gate.ru$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name movie-gate.ru;
root /var/www/movie-gate.ru/html/;
location / {
index index.html;
add_header Content-Security-Policy "default-src 'none'; script-src 'self' 'unsafe-eval'; connect-src 'self' ws: wss:; frame-src youtube.com www.youtube.com; img-src 'self' data:; sty>
add_header X-Frame-Options "ALLOW-FROM youtube.com www.youtube.com" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Strict-Transport-Security "max-age=31536000";
add_header Referrer-Policy "strict-origin";
try_files $uri $uri/ /index.html;
}
location /api/v1/ {
proxy_pass https://127.0.0.1:8088;
}
location /api/v1/film/recommendation {
proxy_pass https://127.0.0.1:8088/api/v1/film/recommendation;
proxy_cache all;
proxy_cache_valid any 1m;
}
location ~ \.(js|css|webmanifest)$ {
try_files $uri =404;
access_log off;
expires 3d;
}
location ~ \.(png|jpg|webp|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}
location /api/v1/notifications {
proxy_pass https://127.0.0.1:8088/api/v1/notifications;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 10m;
}
ssl_certificate /etc/letsencrypt/live/movie-gate.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/movie-gate.ru/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/movie-gate.ru/chain.pem;
include snippets/ssl-params.conf;
}
server {
listen 80;
listen [::]:80;
server_name uikit.movie-gate.ru;
return 301 https://uikit.movie-gate.ru.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name uikit.movie-gate.ru;
root /var/www/moviegate-storybook;
index index.html;
ssl_certificate /etc/letsencrypt/live/uikit.movie-gate.ru/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/uikit.movie-gate.ru/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/uikit.movie-gate.ru/chain.pem;
include snippets/ssl-params.conf;
}