nginx terminé

This commit is contained in:
0x00000000
2025-06-14 22:21:08 +02:00
parent 7c60e64c67
commit 527dbd3991
2 changed files with 15 additions and 2 deletions
+4 -1
View File
@@ -7,4 +7,7 @@ RUN apt install openssl -y
RUN openssl req -x509 -nodes -out /etc/nginx/ssl/inception.crt -keyout /etc/nginx/ssl/inception.key -subj "/C=FR/ST=IDF/L=Paris/O=42/OU=42/CN=yantoine.42.fr/UID=yantoine" RUN openssl req -x509 -nodes -out /etc/nginx/ssl/inception.crt -keyout /etc/nginx/ssl/inception.key -subj "/C=FR/ST=IDF/L=Paris/O=42/OU=42/CN=yantoine.42.fr/UID=yantoine"
RUN mkdir -p /etc/nginx/ssl RUN mkdir -p /etc/nginx/ssl
RUN mkdir -p /var/run/nginx RUN mkdir -p /var/run/nginx
COPY conf/nginx.conf /etc/nginx/nginx.conf COPY conf/nginx.conf /etc/nginx/nginx.conf
RUN chmod 755 /var/www/html
RUN chown -R www-data:www-data /var/www/html
CMD [ "nginx", "-g", "daemon off;" ]
+11 -1
View File
@@ -7,6 +7,16 @@ server {
#root and index and server_name #root and index and server_name
root /var/www/html; root /var/www/html;
server_name localhost; server_name yantoine.42.fr;
index index.php index.html index.htm; index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
# Pour toutes les requetes php
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass php:9000;
}
} }