-
-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- DietPi-Software | TasmoAdmin: Resolved an issue on Bookworm systems with Nginx and Lighttpd webserver where login and logout did not work anymore as the rewrite directives pointed to a file which does not exist anymore since TasmoAdmin v3. Many thanks to @TBirth for reporting this issue: https://dietpi.com/forum/t/tasmoadmin-not-found-after-visiting-login-page/17632
- Loading branch information
Showing
6 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
$HTTP["url"] =~ "^/tasmoadmin($|/)" { | ||
# Deny direct access to .htaccess and data directory | ||
$HTTP["url"] =~ "^/tasmoadmin/(\.|data)" { | ||
# Allow direct access to firmwares | ||
$HTTP["url"] !~ "^/tasmoadmin/data/firmwares" { | ||
url.access-deny = ("") | ||
} | ||
} | ||
|
||
# TasmoAdmin URL rewrites | ||
else $HTTP["url"] !~ "^/tasmoadmin/index\.php($|/)" { | ||
url.rewrite-if-not-file = ("^/tasmoadmin/(.*)$" => "/tasmoadmin/index.php?$1") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Location: /etc/nginx/sites-dietpi/dietpi-tasmoadmin.conf | ||
# Based on: https://github.com/TasmoAdmin/TasmoAdmin/blob/master/.docker/rootfs/etc/nginx/nginx.conf | ||
location ^~ /tasmoadmin { | ||
# Allow direct access to firmwares | ||
location ^~ /tasmoadmin/data/firmwares { | ||
add_header Access-Control-Allow-Origin *; | ||
} | ||
|
||
# Deny direct access to .htaccess and data directory | ||
location ~ ^/tasmoadmin/(?:\.|data) { | ||
deny all; | ||
} | ||
|
||
location ~ ^/tasmoadmin/index\.php(/|$) { | ||
fastcgi_pass php; | ||
fastcgi_read_timeout 900; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
internal; | ||
} | ||
|
||
location ~ \.(css|js|gif||jpe?g|png|json|cache\.json)$ { | ||
} | ||
|
||
location /tasmoadmin { | ||
try_files $uri $uri/ /tasmoadmin/index.php$is_args$args; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters