From ab4512d092366e987a7dd8619f60e0c88b29e821 Mon Sep 17 00:00:00 2001 From: Lucas DELANIER Date: Tue, 7 May 2024 20:15:30 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'nginx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/nginx.conf b/nginx.conf index 61dd4de..2d14b2f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,26 +1,11 @@ -worker_processes 4; +server { + listen 80 default_server; -events { - worker_connections 1024; -} - -http { - server { - listen 80; - server_name YOUR_SERVER_NAME; - charset utf-8; - root /usr/share/nginx/html; - index index.html; + root /usr/share/nginx/html; - #Always serve index.html for any request - location / { - try_files $uri /index.html; - include /etc/nginx/mime.types; <- this fixed my problem with css being read as `text/plain` mimetype - } - error_log /var/log/nginx/client-error.log; - access_log /var/log/nginx/client-access.log; + index index.html; - server_tokens off; - add_header X-Content-Type-Options nosniff; - } -} \ No newline at end of file + location / { + try_files $uri /index.html =404; + } +}