in progress

This commit is contained in:
Adrien Audebert
2024-09-16 16:09:00 +02:00
parent 863342f720
commit e378ddc694
7 changed files with 104 additions and 83 deletions

30
config/nginx.conf Normal file
View File

@@ -0,0 +1,30 @@
server {
listen 80;
#server_name yourdomain.com;
# Redirect HTTP to HTTPS
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /etc/nginx/ssl/certificate.crt;
ssl_certificate_key /etc/nginx/ssl/private.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
root /usr/share/nginx/html;
index index.html;
# Proxy normal HTTP requests to Django
location / {
proxy_pass http://backend: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;
}
}