add: ssl to nginx
This commit is contained in:
parent
6dffb97678
commit
6c6032585f
@ -1,13 +1,12 @@
|
||||
FROM alpine:3.18.4
|
||||
FROM alpine:3.17
|
||||
|
||||
RUN apk update
|
||||
RUN apk add nginx
|
||||
RUN apk add nginx openssl
|
||||
|
||||
RUN adduser -D -g 'www' www
|
||||
|
||||
RUN mkdir /www
|
||||
RUN chown -R www:www /var/lib/nginx
|
||||
RUN chown -R www:www /www
|
||||
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
||||
-keyout /etc/ssl/private/nginx-selfsigned.key \
|
||||
-out /etc/ssl/certs/nginx-selfsigned.crt \
|
||||
-subj "/C=FR/ST=Nouvelle Aquitaine/L=Angouleme/O=42 Angouleme/CN=cchauvet.42.fr"
|
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
|
@ -6,6 +6,9 @@ http
|
||||
{
|
||||
server {
|
||||
listen 443; # Port d'écoute HTTP par défaut
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
||||
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
||||
|
||||
server_name votre_domaine.com; # Remplacez par votre nom de domaine
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user