-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.prod.conf
53 lines (44 loc) · 1.54 KB
/
nginx.prod.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 {
worker_connections 1024;
}
http {
# Enables log and error files
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Redirect HTTP to HTTPS
server {
listen 80;
server_name spectral.ewi.tudelft.nl; # Update with your actual domain
location / {
return 301 https://$host$request_uri;
}
}
# Defines the server listening on port 443 for HTTPS requests
server {
listen 443 ssl;
server_name spectral.ewi.tudelft.nl; # Update with your actual domain
ssl_certificate /certs/spectral_ewi_tudelft_nl.pem;
ssl_certificate_key /certs/spectral_ewi_tudelft_nl.key;
ssl_trusted_certificate /certs/spectral_ewi_tudelft_nl_interm.cer;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
# Configuration for the app service
location / {
proxy_pass http://app:5173; # Proxies requests to the app service
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;
client_max_body_size 2G; # Allows file uploads up to 2G
}
# Configuration for the log service
location ^~ /log/ {
proxy_pass http://log:8080;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}
}
}