ft_transcendence/nginx/conf/default.conf
2025-07-29 14:15:25 +02:00

30 lines
666 B
Text

# please make sure you want to edit this file...
# this allows the redirection of `http://domain/URL` to `https://domain/URL`
server {
charset UTF-8;
listen 80;
listen [::]:80;
resolver $NGINX_RESOLVERS;
server_name $NGINX_DOMAIN;
if ($host = $NGINX_DOMAIN) {
return 301 https://$host$request_uri;
}
return 404;
}
server {
charset UTF-8;
listen [::]:443 ssl;
listen 443 ssl;
server_name $NGINX_DOMAIN;
resolver $NGINX_RESOLVERS;
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
ssl_protocols TLSv1.3;
proxy_set_header X-Forwarded true;
include conf.d/locations/*.conf;
}