nginx terminé
This commit is contained in:
@@ -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 mkdir -p /etc/nginx/ssl
|
||||
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;" ]
|
||||
@@ -7,6 +7,16 @@ server {
|
||||
|
||||
#root and index and server_name
|
||||
root /var/www/html;
|
||||
server_name localhost;
|
||||
server_name yantoine.42.fr;
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user