Was the software title installed freshly or updated/migrated? Fresh installation
Can this issue be replicated on a fresh installation of DietPi? Yes
← If you sent a “dietpi-bugreport”, please paste the ID here → 5d5bdec4-2d25-4a8c-9820-8c9f464f7043
Steps to reproduce
Fresh installation of TasmoAdmin via dietpi-software
I tested with nginx and lighttpd and both showed 404, it redirects to /tasmoadmin/login which does not exist.
But according to this it worked back in May
It looks like something has changed in the current Tasmoadmin version and the web server configuration with Nginx and Lighttpd no longer works, while Apache2 still works fine. Something we need to have a look into. Ping @MichaIng
While with Nginx it was trivial, it took me the whole evening to figure out how to fix it for Lighttpd:
/tasmoadmin/pages/login.php is the correct login script, but it cannot be called directly.
Since TasmoAdmin 3.0.0, all requests must be done via index.php, appending query strings and paths. Hence the redirect target needs to be /tasmoadmin/index.php/login. The same is true for all other rewrites. Positive aspect is that there is no complicated per-URL logic required anymore, but a single rule to rewrite all /tasmoadmin/foo to /tasmoadmin/index.php/foo is sufficient. The backend now has a front controller to internally handle request URLs correctly.
While this works with Apache and Nginx, Lighttpd has problems: Deep investigation revealed a general problem about how Lighttpd sets FastCGI parameters when doing rewrites to the backend. Particularly, it sets PHP_SELF to /tasmoadmin/index.php/login while it is intended to be the path to the script only, i.e. /tasmoadmin/index.php. With the path still appended to the URL, the backend now internally creates all URLs (hence all navigation links) prefixed with /tasmoadmin/index.php/, as it is now understood as parent directory of the script login, instead of the script itself. Hence e.g. all asset URLs are broken.
I observed the same problem when trying to beautify URLs in ownCloud and Nextcloud, hence removing the index.php. The rewrite works in one direction, but the backend creates all internal URLs again with index.php.
What luckily works is doing rewrites to /tasmoadmin/index.php/?login, hence appending the path as query string instead. Lighttpd then does the split correctly and thank god the backend still handles everything correctly.
I hope that with the same little change, pretty URLs will finally work as well for Nextcloud and ownCloud with Lighttpd.
Please update your TasmoAdmin Lighttpd config and let me know whether there are still issues: