n'importe tu sais: nginx
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
services:
|
||||
nginx:
|
||||
image: cchauvet/nginx
|
||||
image: nginx
|
||||
build: nginx
|
||||
ports:
|
||||
- "443:443"
|
||||
|
@ -8,6 +8,6 @@ RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
|
||||
-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
|
||||
COPY nginx.conf /etc/nginx/http.d/default.conf
|
||||
|
||||
ENTRYPOINT ["nginx"]
|
||||
ENTRYPOINT ["nginx", "-g", "daemon off;"]
|
||||
|
@ -1,25 +1,15 @@
|
||||
events
|
||||
{
|
||||
server {
|
||||
listen 443 ssl;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
|
||||
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
root /var/www/html; # Répertoire racine du site web
|
||||
|
||||
index index.html; # Page d'index par défaut
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404; # Gère les requêtes pour les fichiers statiques
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
daemon off;
|
||||
|
Reference in New Issue
Block a user