mirror of
https://github.com/AudebertAdrien/ft_transcendence.git
synced 2025-12-16 05:57:48 +01:00
31 lines
728 B
Nginx Configuration File
31 lines
728 B
Nginx Configuration File
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;
|
|
}
|
|
}
|