Nginx local ssl
This commit is contained in:
18
NginxLocalSSL/conf/default.conf
Normal file
18
NginxLocalSSL/conf/default.conf
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user