ft_transcendence/nginx/conf/default.conf
Maieul BOYER 0db41a440d feat(frontend): scaffolding to build frontend
- Added `make fnginx` to have better dev experience
- Added app.conf to nginx configuration to handle frontend
2025-11-11 00:20:26 +01:00

31 lines
715 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;
resolver $NGINX_RESOLVERS;
server_name $NGINX_DOMAIN;
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;
error_page 497 https://$http_host$request_uri;
include conf.d/locations/*.conf;
}