-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathchemistry-cafe-nginx.conf
More file actions
66 lines (55 loc) · 2.21 KB
/
Copy pathchemistry-cafe-nginx.conf
File metadata and controls
66 lines (55 loc) · 2.21 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
server {
# redirect HTTP to HTTPS
listen 80;
listen [::]:80;
server_name www.chemcaf3.duckdns.org;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
add_header X-dbg-name "chem-caf3" always;
# DNS name from duckdns.org
server_name chemcaf3.duckdns.org;
#ssl_protocols TLSv1.3 TLSv1.2;
# SSL certificate from certbot
ssl_certificate /etc/letsencrypt/live/chemcaf3.duckdns.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/chemcaf3.duckdns.org/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
ssl_trusted_certificate /etc/letsencrypt/live/chemcaf3.duckdns.org/chain.pem;
location /signin-google/ {
add_header X-auth-dbg "authenticating" always;
proxy_pass http://localhost:8080/signin-google/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}
location /api/ {
# access_log /var/log/nginx/api.log;
add_header X-debug $request_uri always;
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
# proxy_pass http://127.0.0.1:8080/api/$request_uri;
fastcgi_intercept_errors off;
}
# frontend
location / {
add_header X-debug-msg "frontend" always;
proxy_pass http://localhost:5173;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host;
}
}