First things first: you may be misunderstanding how phones run Linux. A stock Debian install certainly will not work for a number of reasons, but mainly drivers. Storage is second. Phones are flashed with specific images created to work with the storage in each specific phone.
Second: you'd need to make sure the bootloader on your phone is unlocked and able to be used for such a thing. Quick search shows that Ubuntu Touch did work on it at some point, but was deprecated long ago.
Third: if you just want practice, you can probably find packages to install on the phone that will run an HTTP server. That might be a simpler path.
I'm not saying don't try, but you'd be starting from scratch, and if you aren't familiar with these things already, I'm not sure this is a forum to get enough help on the VERY involved process of bootstrapping just a basic running kernel on your phone model. It probably can be done, but you'd be doing it from scratch it seems.