-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx-default
More file actions
43 lines (36 loc) · 1.26 KB
/
nginx-default
File metadata and controls
43 lines (36 loc) · 1.26 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;
listen [::]:443 ssl;
server_name kimble.fun www.kimble.fun;
ssl_certificate /etc/letsencrypt/live/kimble.fun/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/kimble.fun/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
# Redirect www to non-www (optional)
if ($host = www.kimble.fun) {
return 301 https://kimble.fun$request_uri;
}
location / {
proxy_pass http://localhost:5173;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /api/ {
proxy_pass http://localhost:4000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server {
listen 80;
listen [::]:80;
server_name kimble.fun www.kimble.fun;
# Redirect all HTTP traffic to HTTPS
return 301 https://kimble.fun$request_uri;
}