From cd79919670920ece8c7af2c1c15a1dde880ea40a Mon Sep 17 00:00:00 2001 From: "neo.zhu" Date: Tue, 26 Nov 2024 19:11:25 +0800 Subject: [PATCH] Update nginx.conf --- src/CleanAspire.ClientApp/nginx.conf | 39 ++++++++++++++++++---------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/CleanAspire.ClientApp/nginx.conf b/src/CleanAspire.ClientApp/nginx.conf index 3f29895..213d968 100644 --- a/src/CleanAspire.ClientApp/nginx.conf +++ b/src/CleanAspire.ClientApp/nginx.conf @@ -1,20 +1,31 @@ -server { - listen 80; - listen 443 ssl; +worker_processes auto; - ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; - ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; +events { + worker_connections 1024; +} - server_name localhost; +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; - location / { - root /usr/share/nginx/html; - index index.html; - try_files $uri $uri/ /index.html; - } + # Define a server block here + server { + listen 80; + listen 443 ssl; + + ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; + ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; + + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } - error_page 404 /404.html; - location = /404.html { - internal; + error_page 404 /404.html; + location = /40x.html { + } } }