From 481baf1a9f3331277ec02e0b374b29523d4dcd5e Mon Sep 17 00:00:00 2001 From: flejk Date: Thu, 6 Jun 2024 18:48:57 +0200 Subject: [PATCH] Added nginx.conf --- nginx.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 nginx.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..7dec8b4 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,24 @@ +server { + listen 80; + server_name your_domain.com; + + root /var/www; + + # Main location block + location / { + try_files $uri $uri/ =404; + } + + # User directories + location ~ ^/~(.+?)(/.*)?$ { + alias /var/www/$1$2; + autoindex on; + index index.html; + try_files $uri $uri/ /~$1/index.html; + } + + error_page 404 /404.html; + location = /404.html { + internal; + } +}