Files
Docker-Composes/NginxLocalSSL/conf/default.conf
Alejandro Sarmiento 774b27278d Nginx local ssl
2024-03-05 23:04:51 +01:00

19 lines
523 B
Plaintext

server {
listen 80;
server_name yourdomain.com www.yourdomain.com;
return 301 https://$server_name$request_uri; # Redirige HTTP a HTTPS
}
server {
listen 443 ssl;
server_name yourdomain.com www.yourdomain.com;
ssl_certificate /etc/nginx/ssl/cert.pem; # Ruta al certificado dentro del contenedor
ssl_certificate_key /etc/nginx/ssl/localserver.key; # Ruta a la clave privada dentro del contenedor
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
}