I'm using the latest version of tower-http (0.4.4) and following the same approach as in the main example
Router::new().nest_service("/assets", ServeDir::new("assets"));
Everything runs smoothly in development, but I don't understand why when I deploy it to Debian Linux, the static file URLs result in a 404 error.
Did you also deploy the /assets directory to production in the same directory as the Rust binary? It still needs the files available to server them, they aren't compiled into your binary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With