This repository was archived by the owner on Jan 7, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
43 lines (35 loc) · 1.38 KB
/
nginx.conf
File metadata and controls
43 lines (35 loc) · 1.38 KB
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
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name adflux.bobliu.tech;
ssl_certificate /etc/letsencrypt/live/bobliu.tech/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/bobliu.tech/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 1d;
ssl_session_tickets off;
ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';
ssl_prefer_server_ciphers off;
error_page 502 @json_502;
location @json_502 {
add_header Content-Type application/json always;
return 502 '{"message": "\u670D\u52A1\u5668\u9519\u8BEF\uFF1A502 Bad Gateway"}';
}
client_max_body_size 10M;
location /api {
proxy_pass http://127.0.0.1:8820;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_set_header Host $host;
}
location /ads {
alias /var/www/AdFlux/tracker/;
add_header 'Access-Control-Allow-Origin' '*' always;
}
location / {
root /var/www/AdFlux/frontend/;
index index.html;
try_files $uri $uri/ /index.html;
}
}