initial commit

This commit is contained in:
2024-01-17 16:53:15 +01:00
commit 04b138497b
11 changed files with 238 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
FROM debian:buster
RUN apt update -y
RUN apt install nginx -y
RUN apt install openssl -y
RUN mkdir -p /etc/nginx/ssl
RUN openssl req -x509 -nodes -out /etc/nginx/ssl/inception.crt -keyout /etc/nginx/ssl/inception.key -subj "/C=FR/ST=CM/L=ANgouleme/O=42/OU=42/CN=vvaas/UID=vvaas"
#create a non-encrypted SSL certificate
COPY conf/nginx.conf /etc/nginx/conf.d
# move the nginx config file in conf into the docker container
RUN chmod +w /var/www/html
RUN chown -R www-data:www-data /var/www/html
EXPOSE 443
ENTRYPOINT ["nginx", "-g", "daemon off;"]
#start nginx

View File

@@ -0,0 +1,20 @@
server {
listen 0.0.0.0:443;
ssl on;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_certificate /etc/nginx/ssl/inception.crt;
ssl_certificate_key /etc/nginx/ssl/inception.key;
root /var/www/wordpress;
server_name vvaas.42.fr;
index index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass wordpress:9000;
}
}