diff --git a/nginx-default.conf b/nginx-default.conf new file mode 100644 index 0000000..e0332bc --- /dev/null +++ b/nginx-default.conf @@ -0,0 +1,26 @@ +server { + listen 80 default_server; + root /var/www/nZEDb/www; + index index.php index.html index.htm; + + location / { + try_files $uri $uri/ @rewrites; + } + + location @rewrites { + rewrite ^/([^/\.]+)/([^/]+)/([^/]+)/? /index.php?page=$1&id=$2&subpage=$3 last; + rewrite ^/([^/\.]+)/([^/]+)/?$ /index.php?page=$1&id=$2 last; + rewrite ^/([^/\.]+)/?$ /index.php?page=$1 last; + } + + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/run/php/php7.4-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + location ~* \.(notif|nzb)$ { + deny all; + } +} \ No newline at end of file